Example #1
0
    function UsradmCacheForm()
    {
        parent::MailForm(__FILE__);
        page_add_style('
			td.label {
				width: 200px;
			}
			td.field {
				padding-left: 7px;
				padding-right: 7px;
			}
		');
        $cache = ini_parse('inc/conf/cache.php');
        foreach ($cache['Cache'] as $k => $v) {
            $this->widgets[$k]->setValue($v);
        }
        $cacheable = '';
        foreach ($cache['Cacheable'] as $k => $v) {
            if (in_array($k, $this->ignore)) {
                continue;
            }
            if ($v) {
                $cacheable .= $k . " = yes\n";
            } else {
                $cacheable .= $k . " = no\n";
            }
        }
        $this->widgets['cacheable']->setValue($cacheable);
    }
Example #2
0
    function UsradmSettingsForm()
    {
        parent::MailForm(__FILE__);
        page_add_style('
			td.label {
				width: 200px;
			}
			td.field {
				padding-left: 7px;
				padding-right: 7px;
			}
		');
        $config = ini_parse('inc/conf/config.ini.php');
        foreach ($config as $cname => $conf) {
            foreach ($conf as $k => $v) {
                if (isset($this->widgets[$cname . '_' . $k])) {
                    $this->widgets[$cname . '_' . $k]->setValue($v);
                }
            }
        }
    }
Example #3
0
    function XedFullscreenForm()
    {
        parent::MailForm();
        $this->parseSettings('inc/app/xed/forms/fullscreen/settings.php');
        global $cgi;
        page_onunload('xed_fullscreen_copy_value ()');
        page_add_script('
			function xed_fullscreen_copy_value (form, field) {
				s = xed_get_source ("xeditor");
				opener.document.getElementById ("' . $cgi->ifname . '").contentWindow.document.body.innerHTML = s;
				window.close ();
			}
		');
        page_add_style('
			.content {
				padding-right: 0px ! important;
				padding-left: 0px ! important;
				padding-top: 3px ! important;
				padding-bottom: 5px ! important;
			}
		');
    }
Example #4
0
<?php

loader_import('sitegallery.Functions');
if (session_admin()) {
    $acl = session_allowed_sql();
} else {
    $acl = session_approved_sql();
}
$res = db_fetch_array('select name, display_title, extension, description from sitellite_filesystem where path = ? and ' . $acl . ' order by name asc', $parameters['path']);
if ($parameters['title']) {
    if ($box['context'] == 'action') {
        page_title($parameters['title']);
    } else {
        echo '<h2>' . $parameters['title'] . '</h2>';
    }
}
$valid = appconf('valid');
foreach (array_keys($res) as $k) {
    if (!in_array(strtolower($res[$k]->extension), $valid)) {
        unset($res[$k]);
        continue;
    }
    $res[$k]->src = sitegallery_get_thumbnail($parameters['path'] . '/' . $res[$k]->name . '.' . $res[$k]->extension, true);
    //list ($res[$k]->width, $res[$k]->height) = getimagesize ('inc/data/' . $parameters['path'] . '/' . $res[$k]->name . '.' . $res[$k]->extension);
}
template_simple_register('results', $res);
page_add_script(site_prefix() . '/inc/app/sitegallery/js/prototype.js');
page_add_script(site_prefix() . '/inc/app/sitegallery/js/scriptaculous.js?load=effects');
page_add_script(site_prefix() . '/inc/app/sitegallery/js/lightbox.js');
page_add_style(site_prefix() . '/inc/app/sitegallery/html/lightbox.css');
echo template_simple('gallery.spt', array('path' => $parameters['path'], 'total' => count($res) + 1, 'desc' => $parameters['descriptions']));
Example #5
0
        die($q->error);
    }
    $total = $q->rows();
    $res = $q->fetch($cgi->offset, appconf('limit'));
    $q->free();
} else {
    $q = db_query('select * from siteblog_post where category = ? order by created desc');
    if (!$q->execute($parameters['id'])) {
        die($q->error);
    }
    $total = $q->rows();
    $res = $q->fetch($cgi->offset, appconf('limit'));
    $q->free();
}
$res =& siteblog_translate($res);
$pg = new Pager($cgi->offset, appconf('limit'), $total);
$pg->setUrl(site_prefix() . '/index/siteblog-topic-action/id.' . $parameters['id'] . '/title.' . $parameters['title']);
$pg->getInfo();
template_simple_register('pager', $pg);
foreach (array_keys($res) as $k) {
    $res[$k]->comments = db_shift('select count(id) from siteblog_comment where child_of_post = ?', $res[$k]->id);
    $res[$k]->comments_on = true;
    $res[$k]->category_name = siteblog_filter_category($res[$k]->category);
    if ($res[$k]->status == 'visible') {
        $res[$k]->sitellite_status = 'approved';
    } else {
        $res[$k]->sitellite_status = 'draft';
    }
}
page_add_style(site_prefix() . '/inc/app/siteblog/html/post.css');
echo template_simple('posts.spt', array('post' => $res));
Example #6
0
<?php

global $cgi;
foreach ($parameters as $k => $p) {
    $cgi->{$k} = $p;
}
loader_import('cms.Versioning.Rex');
$rex = new Rex('siteblog_post');
loader_import('siteblog.Filters');
page_add_style('/inc/app/siteblog/html/post.css');
//if (! empty ($cgi->template)) {
//    $template = $cgi->template;
//} else {
$template = 'post.spt';
//}
if (!empty($cgi->maxlen)) {
    $maxlen = $cgi->maxlen;
} else {
    $maxlen = false;
}
$tproperties = db_fetch_array('select * from siteblog_category');
foreach ($tproperties as $t) {
    $properties[$t->id] = array('poster_visible' => $t->poster_visible, 'comments' => $t->comments);
}
if (isset($cgi->category)) {
    $catname = db_shift('select title from siteblog_category where id = ?', $cgi->category);
    if ($catname == 'All Blogs') {
        $query = 'select * from siteblog_post';
    } elseif ($catname == 'Personal Blog') {
        $query = 'select * from siteblog_post where author = "' . session_username() . '" and category = ' . $a->id;
    } else {
Example #7
0
appconf_set('short_date', '%B %e');
// This loads the settings.ini.php file now so the defaults there can affect
// subsequent function calls like page_add_style() below in this file.
appconf_default_settings();
formdata_set('hours', array('00:00:00' => '- SELECT -', '08:00:00' => '&nbsp;8:00 AM', '08:30:00' => '&nbsp;8:30 AM', '09:00:00' => '&nbsp;9:00 AM', '09:30:00' => '&nbsp;9:30 AM', '10:00:00' => '10:00 AM', '10:30:00' => '10:30 AM', '11:00:00' => '11:00 AM', '11:30:00' => '11:30 AM', '12:00:00' => '12:00 PM', '12:30:00' => '12:30 PM', '13:00:00' => '&nbsp;1:00 PM', '13:30:00' => '&nbsp;1:30 PM', '14:00:00' => '&nbsp;2:00 PM', '14:30:00' => '&nbsp;2:30 PM', '15:00:00' => '&nbsp;3:00 PM', '15:30:00' => '&nbsp;3:30 PM', '16:00:00' => '&nbsp;4:00 PM', '16:30:00' => '&nbsp;4:30 PM', '17:00:00' => '&nbsp;5:00 PM', '17:30:00' => '&nbsp;5:30 PM', '18:00:00' => '&nbsp;6:00 PM', '18:30:00' => '&nbsp;6:30 PM', '19:00:00' => '&nbsp;7:00 PM', '19:30:00' => '&nbsp;7:30 PM', '20:00:00' => '&nbsp;8:00 PM', '20:30:00' => '&nbsp;8:30 PM', '21:00:00' => '&nbsp;9:00 PM', '21:30:00' => '&nbsp;9:30 PM', '22:00:00' => '10:00 PM', '22:30:00' => '10:30 PM', '23:00:00' => '11:00 PM', '23:30:00' => '11:30 PM'));
formdata_set('recurring', array('no' => '- ' . intl_get('SELECT') . ' -', 'daily' => intl_get('Daily'), 'weekly' => intl_get('Weekly'), 'monthly' => intl_get('Monthly'), 'yearly' => intl_get('Yearly')));
if ($context == 'action') {
    if (appconf('page_below')) {
        page_below(appconf('page_below'));
    }
    if (appconf('page_alias')) {
        page_id(appconf('page_alias'));
    }
    if (appconf('template')) {
        page_template(appconf('template'));
    }
    global $cgi;
    $url = 'http://' . site_domain() . site_prefix() . '/index/siteevent-rss-action';
    $url2 = 'http://' . site_domain() . site_prefix() . '/index/siteevent-ical-action';
    if ($cgi->category) {
        $url .= '?category=' . $cgi->category;
        $url2 .= '?category=' . $cgi->category;
    } elseif ($cgi->user) {
        $url .= '?user='******'?user='******'alternate', 'application/rss+xml', $url);
    page_add_link('alternate', 'text/calendar', $url2);
    page_add_style(appconf('css_location'));
}
loader_import('siteevent.Filters');
Example #8
0
// import any object we need from the global namespace
global $page, $menu;
// box logic begins here
if ($parameters['recursive'] == 'no') {
    $recur = false;
} else {
    $recur = true;
}
//page_id ('sitemap');
if ($context == 'action') {
    page_title(intl_get('Site Map'));
}
page_add_script(site_prefix() . '/js/jquery-1.2.3.min.js');
page_add_script(site_prefix() . '/js/jquery.cookie.js');
page_add_script(site_prefix() . '/js/jquery-treeview/jquery.treeview.min.js');
page_add_style(site_prefix() . '/js/jquery-treeview/jquery.treeview.css');
page_add_script('<script type="text/javascript">
$(function () {
	$("#sitemap").treeview ({
		animated: "medium",
		control: "#sidetreecontrol",
		persist: "location"
	});
});
</script>');
page_add_style('<style type="text/css">
ul#sitemap>li>a {
	font-weight: bold;
}
</style>');
echo preg_replace('/^<ul>/', '<ul id="sitemap" class="treeview-gray">', $menu->display('html', '<a href="{site/prefix}/index/{id}">{title}</a>', $recur));
Example #9
0
<?php

// BEGIN KEEPOUT CHECKING
// Add these lines to the very top of any file you don't want people to
// be able to access directly.
if (!defined('SAF_VERSION')) {
    header('HTTP/1.1 404 Not Found');
    echo "<!DOCTYPE HTML PUBLIC \"-//IETF//DTD HTML 2.0//EN\">\n" . "<html><head>\n<title>404 Not Found</title>\n</head><body>\n<h1>Not Found</h1>\n" . "The requested URL " . $PHP_SELF . " was not found on this server.<p>\n<hr>\n" . $_SERVER['SERVER_SIGNATURE'] . "</body></html>";
    exit;
}
// END KEEPOUT CHECKING
// custom application properties go here.
// this helps centralize values that would be often referenced
// in multiple places in your application.
define('E_UNAUTHORIZED', 401);
define('E_FORBIDDEN', 403);
define('E_NOT_FOUND', 404);
define('E_SERVER_ERROR', 500);
conf_set('errors', array(E_UNAUTHORIZED => array('title' => 'Unauthorized', 'message' => 'You do not have the permission to view the requested document.'), E_FORBIDDEN => array('title' => 'Forbidden', 'message' => 'The requested document is forbidden.'), E_NOT_FOUND => array('title' => 'Not Found', 'message' => 'The requested document was not found on this server.'), E_SERVER_ERROR => array('title' => 'Server Error', 'message' => 'The server has encountered an unknown internal error.')));
formdata_set('provinces', array('Alberta', 'British Columbia', 'Manitoba', 'New Brunswick', 'Newfoundland', 'Northwest Territories', 'Nova Scotia', 'Nunavut', 'Ontario', 'Quebec', 'Prince Edward Island', 'Saskatchewan', 'Yukon Territories'));
formrules_set('username', array(array('not empty', 'You must enter a username to continue.'), array('unique "sitellite_user/username"', 'The username you have chosen is already in use.')));
if (session_admin()) {
    page_add_style(site_prefix() . '/inc/html/admin/extra.css');
}
Example #10
0
<?php

loader_import('xed.Cleaners');
global $cgi;
$cgi->html = the_cleaners($cgi->html);
page_add_style(site_prefix() . '/js/prompt.css');
page_add_script(site_prefix() . '/js/prototype.js');
page_add_script(site_prefix() . '/js/scriptaculous/scriptaculous.js');
page_add_script(site_prefix() . '/js/prompt.js');
class XedSourceForm extends MailForm
{
    function XedSourceForm()
    {
        parent::MailForm();
        $this->parseSettings('inc/app/xed/forms/source/settings.php');
        $this->ifname = $GLOBALS['cgi']->ifname;
    }
    function onSubmit($vals)
    {
        $i = $vals['ifname'];
        $html = str_replace(array("'", "\r", "\n"), array('\\\'', '\\r', '\\n'), $vals['html']);
        unset($vals['ifname']);
        unset($vals['submit_button']);
        header('Content-Type: text/html; charset=' . intl_charset());
        echo template_simple('source_return.spt', array('ifname' => $i, 'html' => $html));
        exit;
    }
}
Example #11
0
page_add_style('

/* SimpleCal calendar style */

table.simplecal {
	background-color: #fff;
}

table.simplecal a {
	font-weight: bold;
	color: #369 !important;
}

table.simplecal a:hover {
	text-decoration: underline;
}

table.simplecal td.previous-month {
	border: 1px solid #ddd;
	border-right: 0px none;
	text-align: left;
	padding-left: 3px;
}

table.simplecal td.previous-month:hover {
	/*border: 1px solid #ccc;*/
}

table.simplecal td.next-month {
	border: 1px solid #ddd;
	border-left: 0px none;
	text-align: right;
	padding-right: 3px;
}

table.simplecal td.next-month:hover {
	/*border: 1px solid #ccc;*/
}

table.simplecal td.current-month {
	font-weight: bold;
	color: #000;
	font-size: 16px;
	height: 40px;
	vertical-align: middle;
	border-top: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
}

table.simplecal tr.day-headings td {
	color: #000;
	background-color: #cde;
	font-weight: bold;
	width: 20px;
	padding: 3px;
	/* padding-bottom: 0px; */
}

table.simplecal td.day {
	background-color: #fff;
	border: 1px solid #ddd;
	color: #000;
	padding-bottom: 0px;
	height: 75px;
	width: 14%;
}

table.simplecal td.weekend-day {
	background-color: #eee;
	border: 1px solid #ddd;
	color: #000;
	padding-bottom: 0px;
	height: 75px;
	width: 14%;
}

table.simplecal td.inactive {
	border: 1px solid #eee;
	padding-bottom: 0px;
	width: 14%;
	height: 75px;
}

table.simplecal td.current-day {
	color: #000;
	border: 1px solid #cde;
	background-color: #cde;
	padding-bottom: 0px;
	width: 14%;
	height: 75px;
}

table.simplecal span.day-date {
	height: 100%;
	width: 20px;
	vertical-align: top;
	display: block;
	float: left;
	font-weight: bold;
}

table.simplecal a.link {
	font-weight: normal;
}

table.simplecal a.link:hover {
	text-decoration: underline;
}

table.simplecal a.link-important {
	color: #b00 !important;
	font-weight: bold;
}

table.simplecal a.link-important:hover {
	text-decoration: underline;
}

');
Example #12
0
 /**
  * Returns the display HTML for this widget.  The optional
  * parameter determines whether or not to automatically display the widget
  * nicely, or whether to simply return the widget (for use in a template).
  * 
  * @access	public
  * @param	boolean	$generate_html
  * @return	string
  * 
  */
 function display($generate_html = 0)
 {
     $data = '';
     $attrstr = $this->getAttrs();
     $selected = explode(',', $this->data_value);
     if (session_is_resource($this->table) && !session_allowed($this->table, 'rw', 'resource')) {
         $allowed = false;
     } else {
         $allowed = true;
     }
     $this->_list = $this->getList();
     $this->_selected = $this->getSelected();
     foreach ($this->_list as $k => $v) {
         if (in_array($v->id, $this->_selected)) {
             $this->_list[$k]->selected = true;
         } else {
             $this->_list[$k]->selected = false;
         }
     }
     if (!$this->id) {
         $this->_id = $this->id;
         $this->id = 'false';
     }
     static $loaded = false;
     if (!$loaded) {
         page_add_style($this->_style);
         page_add_script(site_prefix() . '/js/rpc-compressed.js');
     }
     $this->loaded = $loaded;
     page_add_script(template_simple($this->_script, $this));
     $loaded = true;
     if (isset($this->_id)) {
         $this->id = $this->_id;
         unset($this->_id);
     }
     return template_simple($this->_output, $this);
 }
Example #13
0
} else {
    $data['package'] = false;
    $data['class'] = false;
}
$data['apps'] = Docs::apps();
$data['current'] = $parameters['current'];
$data['current_name'] = $data['apps'][$data['current']];
if (empty($data['current_name'])) {
    $data['current_name'] = appconf('title');
}
page_add_style(site_prefix() . '/inc/app/docs/html/docs.css');
page_add_script(site_prefix() . '/js/jquery-1.2.3.min.js');
page_add_script(site_prefix() . '/js/jquery.cookie.js');
page_add_script(site_prefix() . '/js/jquery-treeview/jquery.treeview.min.js');
page_add_script(site_prefix() . '/js/jquery-treeview/jquery.treeview.async.js');
page_add_style(site_prefix() . '/js/jquery-treeview/jquery.treeview.css');
page_add_script('<script type="text/javascript">

$(document).ready (function () {
	$("#packages").treeview ({
		animated: "medium",
		control: "#sidetreecontrol",
		persist: "location",
		//url: "' . site_prefix() . '/index/docs-menu-action"
	});
});

</script>');
page_head_title(appconf('title'));
echo template_simple('index.spt', $data);
//info ($data);