0
$db->Execute($query, array($value, $userid, $prefname));
0
- * Returns the stylesheet for the given templateid. Returns a hash with encoding and stylesheet entries.
0
-function get_stylesheet($template_id, $media_type = '')
0
- $templateops = $gCms->GetTemplateOperations();
0
- #Grab template id and make sure it's actually "somewhat" valid
0
- if (isset($template_id) && is_numeric($template_id) && $template_id > -1)
0
- #Ok, it's valid, let's load the bugger
0
- $templateobj =& $templateops->LoadTemplateById($template_id);
0
- #If it's valid after loading, then start the process...
0
- if ($templateobj !== FALSE && ($templateobj->active == '1' || $templateobj->active == TRUE) )
0
- $result['encoding'] = CmsResponse::get_encoding();
0
- #Load in the "standard" template CSS if media type is empty
0
- if ($media_type == '')
0
- if (isset($templateobj->stylesheet) && $templateobj->stylesheet != '')
0
- $css .= $templateobj->stylesheet;
0
- #Handle "advanced" CSS Management
0
- $cssquery = "SELECT css_text FROM ".cms_db_prefix()."css c, ".cms_db_prefix()."css_assoc ca
0
- WHERE id = assoc_css_id
0
- AND assoc_type = 'template'
0
- AND c.media_type = ? ORDER BY ca.create_date";
0
- $cssresult =& $db->Execute($cssquery, array($template_id, $media_type));
0
- while ($cssresult && $cssline = $cssresult->FetchRow())
0
- $css .= "\n".$cssline['css_text']."\n";
0
- if ($cssresult) $cssresult->Close();
0
- $result['nostylesheet'] = true;
0
- $result['encoding'] = CmsResponse::get_encoding();
0
- #$css = preg_replace("/[\r\n]/", "", $css); //hack for tinymce
0
- $result['stylesheet'] = $css;
0
-function get_stylesheet_media_types($template_id)
0
- $db =& $gCms->GetDb();
0
- $templateops =& $gCms->GetTemplateOperations();
0
- #Grab template id and make sure it's actually "somewhat" valid
0
- if (isset($template_id) && is_numeric($template_id) && $template_id > -1)
0
- #Ok, it's valid, let's load the bugger
0
- $templateobj = $templateops->LoadTemplateById($template_id);
0
- if (isset($templateobj->stylesheet) && $templateobj->stylesheet != '')
0
- #If it's valid after loading, then start the process...
0
- if ($templateobj !== FALSE && ($templateobj->active == '1' || $templateobj->active == TRUE) )
0
- #Handle "advanced" CSS Management
0
- $cssquery = "SELECT DISTINCT media_type FROM ".cms_db_prefix()."css c, ".cms_db_prefix()."css_assoc
0
- WHERE id = assoc_css_id
0
- AND assoc_type = 'template'
0
- $cssresult = &$db->Execute($cssquery, array($template_id));
0
- while ($cssresult && !$cssresult->EOF)
0
- if (!in_array($cssresult->fields['media_type'], $result))
0
- $result[] =& $cssresult->fields['media_type'];
0
- $cssresult->MoveNext();
0
- if ($cssresult) $cssresult->Close();
0
- * Strips slashes from an array of values.
0
-function & stripslashes_deep(&$value)
0
- $value = array_map('stripslashes_deep', $value);
0
- elseif (!empty($value) && is_string($value))
0
- $value = stripslashes($value);
0
function create_textarea($enablewysiwyg, $text, $name, $classname='', $id='', $encoding='', $stylesheet='', $width='80', $height='15',$forcewysiwyg='',$wantedsyntax='')
0
- * Displays the login form (frontend)
0
-function display_login_form()
0
- return '<form method=post action="'.$_SERVER['PHP_SELF'].'">'.
0
- 'Name: <input type="text" name="login_name"><br>'.
0
- 'Password: <input type="password" name="login_password"><br>'.
0
- '<input type="submit">'.
0
* Creates a string containing links to all the pages.
0
* @param page - the current page to display
0
* @param limit - the amount of items to list per page
0
* @return a string containing links to all the pages (ex. next 1,2 prev)
0
- function pagination($page, $totalrows, $limit)
0
+function pagination($page, $totalrows, $limit)
0
$from = ($page * $limit) - $limit;
0
$numofpages = $totalrows / $limit;
0
-function wysiwyg_form_submit()
0
- $userid = get_userid(false);
0
- $wysiwyg = get_preference($userid, 'wysiwyg');
0
- if (isset($wysiwyg) && $wysiwyg != '')
0
- #Perform the content title callback
0
- reset($gCms->modules);
0
- while (list($key) = each($gCms->modules))
0
- $value =& $gCms->modules[$key];
0
- if ($gCms->modules[$key]['installed'] == true &&
0
- $gCms->modules[$key]['active'] == true)
0
- $gCms->modules[$key]['object']->WYSIWYGPageFormSubmit();
0
- $result = @ob_get_contents();
Comments
No one has commented yet.