示例#1
0
			</ul>
		</nav>
		<ul class="contact">
			<li><a href="mailto:ruben@rubensayshi.com">E-Mail</a></li>
			<li><a href="http://twitter.com/saiko_ben">Twitter</a></li>
			<li><a href="https://github.com/rubensayshi">Github</a></li>
		</ul>
	</div>
	<div class="grid_9 content-wrapper">
		<div class="content">
			<?php 
echo $page['content'];
?>
		</div>
	</div>
</div>

<script type="text/javascript" src="<?php 
echo asset('js/jquery-1.6.2.js');
?>
"></script>
<script type="text/javascript" src="<?php 
echo asset('js/tilt.js');
?>
"></script>
<?php 
echo get_javascript();
?>
</body>
</html>
示例#2
0
 function replace()
 {
     global $messageStack, $request_type;
     if (!$this->display_template_output) {
         return;
     }
     // Go out if we don't use template
     if (defined("STS_END_CHAR") == false) {
         define('STS_END_CHAR', '');
     }
     // An end char must be defined, even if empty.
     // Load up the <head> content that we need to link up everything correctly.  Append to anything that may have been set in sts_user_code.php
     // Note that since v3.0, stylesheet is not defined here but in the template file, allowing different stylesheet for different template.
     $this->template['headcontent'] = $this->template['headcontent'] . '';
     $this->template['headcontent'] = $this->template['headcontent'] . '<meta http-equiv="Content-Type" content="text/html; charset=' . CHARSET . '">' . "\n";
     $this->template['headcontent'] = $this->template['headcontent'] . $this->template['headertags'] . "\n";
     $this->template['headcontent'] = $this->template['headcontent'] . '<base href="' . ($request_type == 'SSL' ? HTTPS_SERVER : HTTP_SERVER) . DIR_WS_CATALOG . '">' . "\n";
     $this->template['headcontent'] = $this->template['headcontent'] . get_javascript($this->template['applicationtop2header'], 'get_javascript(applicationtop2header)');
     $this->script->replace($this->template);
     // Module can make tricks here, just before replacing, like using own content template
     // Add messages before the content
     if ($messageStack->size('header') > 0) {
         $this->template['content'] = $messageStack->output('header') . $this->template['content'];
     }
     // v4.5.4, error and info message from URL were never displayed, so add them before content.
     $this->template['content'] = $this->template['error_message'] . $this->template['info_message'] . $this->template['content'];
     // Manually replace the <!--$headcontent--> if present
     $this->template['template_html'] = str_replace('<!--$headcontent-->', $this->template['headcontent'], $this->template['template_html']);
     // Manually replace the <!--$extracss--> with template['extracss']
     $this->template['template_html'] = str_replace('<!--$extracss-->', $this->template['extracss'], $this->template['template_html']);
     // Automatically replace all the other template variables
     if (STS_END_CHAR == '') {
         // If no end char defined for the placeholders, have to sort the placeholders.
         uksort($this->template, "sortbykeylength");
         // Sort array by string length, so that longer strings are replaced first
     }
     foreach ($this->template as $key => $value) {
         $this->template['template_html'] = str_replace('$' . $key . STS_END_CHAR, $value, $this->template['template_html']);
     }
 }
示例#3
0
文件: index.php 项目: horrabin/opendb
                                        $errors[] = array('error' => 'Lookup value (' . $HTTP_VARS['value'][$i] . ') not inserted', 'detail' => db_error());
                                    }
                                } else {
                                    $errors[] = array('error' => 'Lookup value (' . $HTTP_VARS['value'][$i] . ') already exists', 'detail' => '');
                                }
                            }
                        }
                    }
                }
                $HTTP_VARS['op'] = 'edit-lookups';
            }
        }
    }
}
if ($HTTP_VARS['op'] == 'new' || $HTTP_VARS['op'] == 'edit') {
    echo get_javascript("admin/s_attribute_type/widgettooltips.js");
    echo get_widget_tooltip_array();
    echo "<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&active_tab=" . $HTTP_VARS['active_tab'] . "\">Back to Main</a>]</p>";
    if ($HTTP_VARS['op'] == 'edit') {
        $attribute_type_r = fetch_s_attribute_type_r($HTTP_VARS['s_attribute_type']);
        if ($attribute_type_r === FALSE) {
            $errors[] = 'Attribute type (' . $HTTP_VARS['s_attribute_type'] . ') not found';
        }
        echo "\n<h3>Edit Attribute type</h3>";
        $save_op = 'update';
        $save_button = 'Update';
    } else {
        echo "\n<h3>New Attribute type</h3>";
        $save_op = 'insert';
        $save_button = 'Insert';
    }
示例#4
0
文件: index.php 项目: horrabin/opendb
                    delete_s_item_listing_conf($HTTP_VARS['silc_id']);
                }
            }
        }
        $HTTP_VARS['op'] = 'edit';
    } else {
        //if(is_exists_s_item_listing_conf($HTTP_VARS['silc_id']))
        // error no item found!
        $HTTP_VARS['op'] = '';
    }
}
// in edit mode, either its a new entry, in which case s_item_type_group / s_item_type is chosen, or its
// an existing item, in which case the silc_id will be provided.
if ($HTTP_VARS['op'] == 'edit') {
    if (($HTTP_VARS['s_item_type_group'] == '*' || is_exists_item_type_group($HTTP_VARS['s_item_type_group'])) && ($HTTP_VARS['s_item_type'] == '*' || is_exists_item_type($HTTP_VARS['s_item_type']))) {
        echo get_javascript("admin/s_item_listing_conf/rowutils.js");
        echo '<style>
					.dataHighlight {background-color: #BDC7F7;font-size: x-small;font-weight: normal;font-family: Verdana, Arial, Helvetica, sans-serif; padding-left: 4px; padding-right: 4px;}
			</style>';
        echo "<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}\">Back to Main</a>]</p>";
        if ($HTTP_VARS['s_item_type_group'] != '*') {
            echo "\n<h3>Edit Item Type Group " . $HTTP_VARS['s_item_type_group'] . " Item Listing Configuration</h3>";
        } else {
            if ($HTTP_VARS['s_item_type'] != '*') {
                echo "\n<h3>Edit Item Type " . $HTTP_VARS['s_item_type'] . " Item Listing Configuration</h3>";
            } else {
                echo "\n<h3>Edit Default Item Listing Configuration</h3>";
            }
        }
        if (is_not_empty_array($errors)) {
            echo format_error_block($errors);
示例#5
0
文件: index.php 项目: horrabin/opendb
 if (is_not_empty_array($site_plugin_r)) {
     $results = fetch_site_attribute_type_rs($HTTP_VARS['site_type']);
     if ($results) {
         $site_attribute_type_r = array();
         while ($site_plugin_attribute_type_r = db_fetch_assoc($results)) {
             $site_attribute_type_r[] = $site_plugin_attribute_type_r['s_attribute_type'];
         }
         db_free_result($results);
     }
     if (is_not_empty_array($site_attribute_type_r)) {
         echo "<p>[<a href=\"{$PHP_SELF}?type={$ADMIN_TYPE}&op=list_site_plugins\">Back to Main</a>]</p>";
         echo "\n<h3>Edit " . $site_plugin_r['title'] . " Site Plugin System Item Types</h3>";
         if (is_not_empty_array($errors)) {
             echo format_error_block($errors);
         }
         echo get_javascript('admin/select.js');
         echo "\n<form name=\"edit_site_plugin_item_types\" action=\"{$PHP_SELF}\" method=\"POST\">";
         echo "\n<input type=\"hidden\" name=\"op\" value=\"" . $HTTP_VARS['op'] . "\">";
         echo "\n<input type=\"hidden\" name=\"type\" value=\"" . $ADMIN_TYPE . "\">";
         echo "\n<input type=\"hidden\" name=\"site_type\" value=\"" . $HTTP_VARS['site_type'] . "\">";
         echo "<table>";
         $exists_item_type_rs = array();
         $not_exists_item_type_rs = array();
         $results = fetch_item_type_rs();
         if ($results) {
             while ($item_type_r = db_fetch_assoc($results)) {
                 $exists = FALSE;
                 for ($i = 0; $i < count($site_attribute_type_r); $i++) {
                     if (is_exists_item_attribute_type($item_type_r['s_item_type'], $site_attribute_type_r[$i])) {
                         $exists = TRUE;
                     }
示例#6
0
 * available):
 * 
 *	<?php 
 *	include_once("./Snoopy.class.php"); 
 *	$snoopy = new Snoopy(); 
 *	$snoopy->fetch("http://127.0.0.1/jason/opendb/whatsnew.php"); 
 *	if($snoopy->status >= 200 && $snoopy->status<300) 
 *	{ 
 *		echo $snoopy->results; 
 *	} 
 *	?>
 */
if (is_site_enabled()) {
    if (is_opendb_valid_session() || is_site_public_access()) {
        $HTTP_VARS['op'] = ifempty($HTTP_VARS['op'], 'marquee');
        if ($HTTP_VARS['op'] == 'marquee') {
            echo get_javascript('common.js');
            echo get_javascript('marquee.js');
            echo "\n<div id=\"lastitemlist-container\">" . get_last_item_list_marquee(get_last_item_list(get_opendb_config_var('welcome.last_items_list', 'total_num_items'), NULL, NULL, NULL, NULL, get_site_url(), TRUE)) . "\n</div>";
            echo "\n<script language=\"JavaScript\">\n\t\t\taddEvent(\n\t\t\t\twindow, \n\t\t\t\t'load', \n\t\t\t\tfunction(){startMarquee('lastitemlist-container', 'lastitemlist-item', 2000);} );\n\t\t\t</script>";
        }
    } else {
        // invalid login, so login instead.
        redirect_login($PHP_SELF, $HTTP_VARS);
    }
} else {
    //if(is_site_enabled())
    opendb_site_disabled();
}
// Cleanup after begin.inc.php
require_once "./include/end.inc.php";
示例#7
0
文件: header.php 项目: nhc/agency-cms
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<title><?php 
echo $sPageTitle;
?>
 - <?php 
echo $sPageTitleSuffix;
?>
</title>

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

<?php 
get_styles($aAdditionalStyles);
?>

<?php 
get_javascript($aAdditionalScripts);
示例#8
0
文件: theme.php 项目: horrabin/opendb
function get_theme_javascript($pageid)
{
    $scripts[] = 'jquery.js';
    $scripts[] = 'common.js';
    $scripts[] = 'date.js';
    $scripts[] = 'forms.js';
    $scripts[] = 'listings.js';
    $scripts[] = 'marquee.js';
    $scripts[] = 'search.js';
    $scripts[] = 'tabs.js';
    $scripts[] = 'validation.js';
    if ($pageid == 'admin') {
        $scripts[] = 'overlibmws/overlibmws.js';
        $scripts[] = 'overlibmws/overlibmws_function.js';
        $scripts[] = 'overlibmws/overlibmws_iframe.js';
        $scripts[] = 'overlibmws/overlibmws_hide.js';
        $scripts[] = 'admin/tooltips.js';
    }
    $buffer = '';
    while (list(, $script) = each($scripts)) {
        $buffer .= get_javascript($script);
    }
    return $buffer;
}
示例#9
0
文件: index.php 项目: horrabin/opendb
        }
    }
}
@set_time_limit(0);
if (strlen($HTTP_VARS['group_id']) == 0) {
    $HTTP_VARS['group_id'] = 'site';
}
// process any updates
if ($HTTP_VARS['op'] == 'save') {
    //print_r($HTTP_VARS);
    save_config($HTTP_VARS, $errors);
}
if (is_not_empty_array($errors)) {
    echo format_error_block($errors);
}
echo get_javascript("admin/config/select.js");
echo "<div class=\"tabContainer\">";
$config_group_rs = NULL;
$results = fetch_s_config_group_rs();
if ($results) {
    while ($config_group_r = db_fetch_assoc($results)) {
        $config_group_rs[] = $config_group_r;
    }
    db_free_result($results);
}
if (is_array($config_group_rs)) {
    echo "\n<ul class=\"tabMenu\" id=\"tab-menu\">";
    $first = TRUE;
    reset($config_group_rs);
    while (list(, $config_group_r) = each($config_group_rs)) {
        if ($config_group_r['id'] == $HTTP_VARS['group_id']) {
示例#10
0
文件: index.php 项目: horrabin/opendb
        $help_entries_rs = NULL;
        if (is_not_empty_array($saatr_already_exists)) {
            $help_entries_rs[] = array('img' => 'rs.gif', 'text' => 'Duplicate Attribute Type & Order No');
        }
        $help_entries_rs[] = array('text' => 'Entries without a <b>attribute type</b> AND <b>order no</b> specified will be ignored.');
        echo format_help_block($help_entries_rs);
        echo get_input_field("blank_rows", NULL, NULL, "value_select(\"1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20\",1)", "N", ifempty($HTTP_VARS['blank_rows'], "5"), FALSE, NULL, "this.form.submit();");
        echo "<input type=\"button\" class=\"button\" value=\"Refresh\" onclick=\"this.form['op'].value='edit'; this.form.submit();\">\n\t\t<input type=\"button\" class=\"button\" value=\"Update\" onclick=\"this.form['op'].value='update'; this.form.submit();\">";
        echo "</form>";
    } else {
        echo format_error_block('Item Type (' . $HTTP_VARS['s_address_type'] . ') not found');
    }
} else {
    if ($HTTP_VARS['op'] == 'new_type' || $HTTP_VARS['op'] == 'insert_type') {
        // Insert type form!
        echo get_javascript("admin/s_item_type/sattooltips.js");
        echo "<p>[<a href=\"{$PHP_SELF}?type=s_address_type&op=edit_types\">Back to Main</a>]</p>";
        echo "\n<h3>New Address Type</h3>";
        echo "\n<form name=\"s_address_type\" action=\"{$PHP_SELF}\" method=\"POST\">";
        echo "\n<input type=\"hidden\" name=\"op\" value=\"insert_type\">";
        echo "\n<input type=\"hidden\" name=\"type\" value=\"" . $HTTP_VARS['type'] . "\">";
        echo "\n<table>";
        display_s_address_type_insert_form($HTTP_VARS['op'] == 'insert_type' ? $HTTP_VARS : NULL);
        echo "</table>";
        echo format_help_block(array('img' => 'compulsory.gif', 'text' => get_opendb_lang_var('compulsory_field'), id => 'compulsory'));
        if (get_opendb_config_var('widgets', 'enable_javascript_validation') !== FALSE) {
            echo "\n<input type=\"button\" class=\"button\" value=\"Insert\" onclick=\"if(!checkForm(this.form)){return false;}else{this.form.submit();}\">";
        } else {
            echo "\n<input type=\"button\" class=\"button\" value=\"Insert\" onclick=\"this.form.submit();\">";
        }
        echo "\n</form>";
</script>
<div id="_SITE_-VID_ID"></div>
TEMPLATE;
define('TEMPLATE', $template);
function get_javascript($site, $flashvars, $params, $url)
{
    $tokens = array('_SITE_', '_FLASHVARS_', '_PARAMS_', '_URL_');
    $values = array($site, $flashvars, $params, $url);
    return str_replace($tokens, $values, TEMPLATE);
}
$qik = get_javascript("qik", "{ 'rssURL': 'http://qik.com/video/VID_ID.rss', 'autoPlay': 'false' }", "{ 'allowScriptAccess': 'sameDomain', 'allowFullScreen': 'true', 'movie': 'http://qik.com/swfs/qikPlayer4.swf', 'quality': 'high', 'bgcolor': '#333333' }", 'http://qik.com/swfs/qikPlayer4.swf');
$tweleve_seconds = get_javascript("12seconds", "{'vid': 'VID_ID' }", "{'movie': 'http://embed.12seconds.tv/players/remotePlayer.swf' }", 'http://embed.12seconds.tv/players/remotePlayer.swf');
$vimeo = get_javascript("vimeo", "{}", "{}", 'http://vimeo.com/moogaloop.swf?clip_id=VID_ID&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1');
$viddler = get_javascript("viddler", "{}", "{}", 'http://www.viddler.com/player/VID_ID');
$jwplayer = get_javascript("jwplayer", "{'image': 'VID_ID.jpg', 'file': 'VID_ID.flv', 'plugins': 'viral-1d'}", "{}", SWFOBJECT_PLUGIN_URL_PATH . 'player-viral.swf');
$youtube = get_javascript("youtube", "{}", "{}", 'http://www.youtube.com/v/VID_ID');
// YouTube
define("VIDEO_CONFIG", serialize(array("jwplayer" => array("width" => 425, "height" => 344, "regexp" => "/\\[jwplayer ([[:print:]]+)\\]/", "code" => $jwplayer), "youtube" => array("width" => 425, "height" => 344, "regexp" => "/\\[youtube ([[:print:]]+)\\]/", "code" => $youtube), "vimeo" => array("width" => 400, "height" => 300, "regexp" => "/\\[vimeo ([[:print:]]+)\\]/", "code" => $vimeo), "viddler" => array("width" => 545, "height" => 348, "regexp" => "/\\[viddler ([[:print:]]+)\\]/", "code" => $viddler), "qik" => array("width" => 425, "height" => 319, "regexp" => "/\\[qik ([[:print:]]+)\\]/", "code" => $qik), "12seconds" => array("width" => 425, "height" => 319, "regexp" => "/\\[12seconds ([[:print:]]+)\\]/", "code" => $tweleve_seconds))));
function video_plugin_callback($match)
{
    $parts = explode(" ", trim(substr($match[0], 1, -1)));
    $config = unserialize(VIDEO_CONFIG);
    $video_type = $config[$parts[0]];
    if (count($parts) > 2) {
        $width = $parts[2] == 0 ? $video_type['width'] : $parts[2];
        $height = $parts[3] == 0 ? $video_type['height'] : $parts[3];
    } else {
        $width = $video_type['width'];
        $height = $video_type['height'];
    }
    $tokens = array('VID_ID', 'WIDTH', 'HEIGHT');
示例#12
0
 /**
  * ajax call
  */
 protected function _draw_ajax()
 {
     $html = $this->load_style ? get_style() : null;
     $html .= $this->load_javascript ? get_javascript() : null;
     die($html);
 }