File:  [mozdev] / cdn / www / b2header.php
Revision 1.11: download - view: text, annotated - select for diffs - revision graph
Sun Mar 16 23:29:37 2003 UTC (16 years, 1 month ago) by cdn
Branches: MAIN
CVS tags: HEAD
deboog

    1: <?php
    2: 
    3: if (!isset($project))
    4:   $project = 'cdn';
    5: 
    6: require_once('/usr/local/sandbox/php/include/globals.h');
    7: 
    8: require_once(PROJECT_PATH . "/b2config.php");
    9: require_once(PROJECT_PATH . '/' .$b2inc."/b2template.functions.php");
   10: require_once(PROJECT_PATH . '/' .$b2inc."/b2verifauth.php");
   11: require_once(PROJECT_PATH . '/' .$b2inc."/b2vars.php");
   12: require_once(PROJECT_PATH . '/' .$b2inc."/b2functions.php");
   13: require_once(PROJECT_PATH . '/' .$b2inc."/xmlrpc.php");
   14: require_once(PROJECT_PATH . '/' .$b2inc."/xmlrpcs.php");
   15: 
   16: if (!isset($use_cache))	$use_cache=1;
   17: if (!isset($blogID))	$blog_ID=1;
   18: if (!isset($debug))		$debug=0;
   19: timer_start();
   20: 
   21: get_currentuserinfo();
   22: 
   23: $request = " SELECT * FROM $tablesettings ";
   24: $result = mysql_query($request);
   25: $querycount++;
   26: while($row = mysql_fetch_object($result)) {
   27: 	$posts_per_page=$row->posts_per_page;
   28: 	$what_to_show=$row->what_to_show;
   29: 	$archive_mode=$row->archive_mode;
   30: 	$time_difference=$row->time_difference;
   31: 	$autobr=$row->AutoBR;
   32: 	$date_format=stripslashes($row->date_format);
   33: 	$time_format=stripslashes($row->time_format);
   34: }
   35: 
   36: // let's deactivate quicktags on IE Mac and Lynx, because they don't work there.
   37: if (($is_macIE) || ($is_lynx))
   38: 	$use_quicktags=0;
   39: 
   40: $b2varstoreset = array('profile','standalone','redirect','redirect_url','a','popuptitle','popupurl','text', 'trackback', 'pingback');
   41: for ($i=0; $i<count($b2varstoreset); $i += 1) {
   42: 	$b2var = $b2varstoreset[$i];
   43: 	if (!isset($$b2var)) {
   44: 		if (empty($HTTP_POST_VARS["$b2var"])) {
   45: 			if (empty($HTTP_GET_VARS["$b2var"])) {
   46: 				$$b2var = '';
   47: 			} else {
   48: 				$$b2var = $HTTP_GET_VARS["$b2var"];
   49: 			}
   50: 		} else {
   51: 			$$b2var = $HTTP_POST_VARS["$b2var"];
   52: 		}
   53: 	}
   54: }
   55: 
   56: if ($standalone == 0) {
   57: 
   58: ?><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
   59: <html>
   60: <head>
   61: <title>b2 > <?php echo $title; ?></title>
   62: <link rel="stylesheet" href="/<?php echo $b2inc; ?>/b2.css" type="text/css">
   63: <style type="text/css">
   64: <!--
   65: <?php
   66: if (!$is_NS4) {
   67: ?>
   68: td.menutop {
   69: 	padding-top: 2px;
   70: 	padding-bottom: 2px;
   71: 	border-color: #999999;
   72: 	border-top-width: 1px;
   73: 	border-bottom-width: 1px;
   74: 	border-left-width: 0px;
   75: 	border-right-width: 0px;
   76: 	border-style: dashed;
   77: }
   78: textarea,input,select {
   79: 	background-color: #f0f0f0;
   80: 	border-width: 1px;
   81: 	border-color: #cccccc;
   82: 	border-style: solid;
   83: 	padding: 2px;
   84: 	margin: 1px;
   85: }
   86: .checkbox {
   87: <?php
   88:  if ((preg_match("/MSIE/",$HTTP_USER_AGENT)) && (!preg_match("/Mac/",$HTTP_USER_AGENT))) {
   89: ?>	background-color: #ffffff;
   90: 	border-width: 0px;
   91: 	padding: 0px;
   92: 	margin: 0px;
   93: }
   94: <?php
   95:  }
   96: }
   97: ?>
   98: -->
   99: </style>
  100: <?php
  101: if ($use_spellchecker) {
  102: ?><script type="text/javascript" language="javascript">
  103: <!--
  104: function DoSpell(formname, subject, body)
  105: {
  106: document.SPELLDATA.formname.value=formname
  107: document.SPELLDATA.subjectname.value=subject
  108: document.SPELLDATA.messagebodyname.value=body
  109: document.SPELLDATA.companyID.value="custom\\http://cafelog.com"
  110: document.SPELLDATA.language.value=1033
  111: document.SPELLDATA.opener.value="<?php echo $pathserver ?>/sproxy.pl"
  112: document.SPELLDATA.formaction.value="http://www.spellchecker.com/spell/startspelling.asp "
  113: window.open("<?php echo $pathserver ?>/b2spell.php","Spell",
  114: "toolbar=no,directories=no,location=yes,resizable=yes,width=620,height=400,top=100,left=100")
  115: }
  116: //-->
  117: </script><?php
  118: }
  119: if ($redirect==1) {
  120: ?>
  121: <script language="javascript">
  122: <!--
  123: function redirect() {
  124:   window.location = "<?php echo $redirect_url; ?>";
  125: }
  126: setTimeout("redirect();", 600);
  127: //-->
  128: </script>
  129: <?php
  130: }
  131: ?>
  132: <script language="javascript">
  133: <!-- hiding from old terrible browsers
  134: 
  135: 	function profile(userID) {
  136: 		window.open ("b2profile.php?action=viewprofile&user="+userID, "Profile", "width=500, height=450, location=0, menubar=0, resizable=0, scrollbars=1, status=1, titlebar=0, toolbar=0, screenX=60, left=60, screenY=60, top=60");
  137: 	}
  138: 
  139: 	function preview(form) {
  140: 		var preview_date = "<?php echo date("Y-m-d H:i:s"); ?>";
  141: 		var preview_userid = "<?php echo $user_ID ?>";
  142: 		var preview_title = form.post_title.value;
  143: 		var preview_category = form.post_category.value;
  144: 		var preview_content = form.content.value;
  145: 		var preview_autobr = form.post_autobr.value;
  146: 		preview_date = escape(preview_date);
  147: 		preview_userid = escape(preview_userid);
  148: 		preview_title = escape(preview_title);
  149: 		preview_category = escape(preview_category);
  150: 		preview_content = escape(preview_content);
  151: 		preview_autobr = escape(preview_autobr);
  152: 		window.open ("<?php echo "$siteurl/$blogfilename" ?>?preview=1&preview_date="+preview_date +"&preview_userid="+preview_userid +"&preview_title="+preview_title +"&preview_category="+preview_category +"&preview_content="+preview_content +"&preview_autobr="+preview_autobr ,"Preview", "location=0,menubar=1,resizable=1,scrollbars=yes,status=1,toolbar=0");
  153: 	}
  154: 
  155: 	function launchupload() {
  156: 		window.open ("b2upload.php", "b2upload", "width=380,height=360,location=0,menubar=0,resizable=1,scrollbars=yes,status=1,toolbar=0");
  157: 	}
  158: 
  159: //  End -->
  160: </script>
  161: </head>
  162: <body bgcolor="#ffffff" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
  163: 
  164: <table width="100%" cellpadding="0" cellspacing="0" align="center">
  165: <?php
  166: if ($profile==0) {
  167: ?>
  168: <tr height="60">
  169: <td valign="top">
  170: <?php include(PROJECT_PATH . '/' .$b2inc."/b2menutop.php") ?>
  171: </td>
  172: </tr><tr>
  173: <?php
  174: }
  175: ?>
  176: <td valign="top">
  177: <img src="/b2-img/blank.gif" border="0" width="35" height="24" />
  178: <div class="panelbody">
  179: <?php
  180: 
  181: }
  182: ?>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>