include_once "yotsuba_config.php";
require_once 'lib/util.php';
/*
if( isset( $_REQUEST["profile"] ) ) {
xhprof_enable( XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY );
register_shutdown_function( "xhprof_save" );
}
if ( isset($_REQUEST["sqlprofile"] )) {
$mysql_query_log = YES;
}
*/
if( TEST_BOARD ) {
ini_set('display_errors', '1');
if( isset( $_REQUEST[ "profile" ] ) ) {
xhprof_enable();
register_shutdown_function( "xhprof_save" );
}
}
include_once 'lib/rpc.php';
include_once 'lib/admin.php';
include_once 'lib/auth.php';
include_once 'lib/json.php';
include_once 'lib/geoip2.php';
//include "strings_e.php"; //String resource file
define( SQLLOGBAN, 'banned_users' ); //Table (NOT DATABASE) used for holding banned users
define( SQLLOGMOD, 'mod_users' ); //Table (NOT DATABASE) used for holding mod users
define( SQLLOGDEL, 'del_log' ); //Table (NOT DATABASE) used for holding deletion log
extract( $_POST, EXTR_SKIP );
extract( $_GET, EXTR_SKIP );
extract( $_COOKIE, EXTR_SKIP );
//if( isset( $_REQUEST['id'] ) ) $id = $_REQUEST['id']; // weird bug?
if( isset( $_POST[ 'id' ] ) && ctype_digit( $_POST[ 'id' ] ) ) $id = $_POST[ 'id' ];
if( isset( $_GET[ 'id' ] ) && ctype_digit( $_GET[ 'id' ] ) ) $id = $_GET[ 'id' ];
if( $argv[1] ) $admin = $argv[1];
// FIXME whitelist
unset( $dest );
unset( $log );
unset( $update_avg_secs );
$access_allow = '';
$access_deny = '';
mysql_board_connect( BOARD_DIR );
function janitor_votes_left()
{
$user = $_COOKIE[ '4chan_auser' ];
$high = mysql_global_do( "SELECT count(id) FROM janitor_votes WHERE moderator = '%s'", $user );
$high = mysql_result( $high, 0, 0 );
$howmany = mysql_global_do( "SELECT COUNT(id) FROM janitor_apps WHERE closed=0 AND age>17", $high );
return mysql_result( $howmany, 0, 0 ) - $high;
}
function append_ban( $board, $ip )
{
// run in background
$cmd = "nohup /usr/local/bin/suid_run_global bin/appendban $board $ip >/dev/null 2>&1 &";
print "User banned from /$board/";
// print $cmd . "
"; //disabling this because it's ugly and leaks filepaths
exec( $cmd );
}
function https_self_url()
{
return "/".BOARD_DIR."/admin";
}
// for lib/admin.php
function delete_uploaded_files()
{
}
function make_post_json($row)
{
$nrow = array();
foreach( $row as $key => $val ) {
if( ctype_digit( $val ) || is_int( $val ) ) {
$val = (int)$val;
}
$nrow[ $key ] = $val;
}
return json_encode( $nrow );
}
function get_board_list() {
//mysql_global_call("SET character_set_results = 'utf8'");
$query = "SELECT dir, name FROM boardlist ORDER BY dir ASC";
$res = mysql_global_call($query);
if (!$res) {
return array();
}
$boards = array();
while ($dir = mysql_fetch_row($res)) {
$boards[$dir[0]] = $dir[1];
}
return $boards;
}
function is_board_valid($board, $allow_hidden = false) {
if (!$allow_hidden && ($board === 'test' || $board === 'j')) {
return false;
}
$query = "SELECT dir FROM boardlist WHERE dir = '%s' LIMIT 1";
$res = mysql_global_call($query, $board);
if (!$res) {
return false;
}
if (mysql_num_rows($res) === 1) {
return true;
}
return false;
}
function admin_clear_reports($board, $post_id) {
$query = "UPDATE reports SET cleared = 1 WHERE board = '%s' AND no = %d";
mysql_global_call($query, $board, $post_id);
$query = << $ban_len) {
$spent_len = $ban_len;
}
}
else {
$spent_len = $ban_len;
}
$recent_duration += $spent_len;
++$recent_ban_count;
}
}
if ($recent_duration) {
$recent_duration = round($recent_duration / 86400.0);
}
return array(
'total' => $total_count,
'recent_bans' => $recent_ban_count,
'recent_warns' => $recent_warn_count,
'recent_days' => $recent_duration,
'recent_permas' => $recent_perma_count
);
}
// Counts recently made threads by IP
function admin_get_thread_history($ip) {
$long_ip = ip2long($ip);
if (!$long_ip) {
return false;
}
$sql = "SELECT COUNT(*) FROM user_actions WHERE action = 'new_thread' AND ip = $long_ip AND time >= DATE_SUB(NOW(), INTERVAL 60 MINUTE)";
$res = mysql_global_call($sql);
if (!$res) {
return false;
}
return (int)mysql_fetch_row($res)[0];
}
function admin_hash_4chan_pass($pass) {
$salt = file_get_contents(SALTFILE);
if (!$salt || !$pass) {
return '';
}
return sha1($pass . $salt);
}
function get_ban_history_html($ban_summary, $host = false) {
$ban_tip = array();
if ($ban_summary['recent_bans'] > 0) {
$ban_tip[] = $ban_summary['recent_bans'] . ' ban' . ($ban_summary['recent_bans'] > 1 ? 's' : '');
}
if ($ban_summary['recent_warns'] > 0) {
$ban_tip[] = $ban_summary['recent_warns'] . ' warning' . ($ban_summary['recent_warns'] > 1 ? 's' : '');
}
if ($ban_summary['recent_days'] > 0) {
$ban_tip[] = $ban_summary['recent_days'] . ' day'
. ($ban_summary['recent_days'] > 1 ? 's' : '')
. ' spent banned';
}
if ($ban_summary['recent_permas'] > 0) {
$ban_tip[] = $ban_summary['recent_permas'] . ' permaban' . ($ban_summary['recent_permas'] > 1 ? 's' : '');
}
$ban_tip = "Past 12 months history- " . implode('
- ', $ban_tip) . '
';
if ($host !== false) {
return "$ban_tip
[ {$ban_summary['total']} ban" .
(($ban_summary['total'] > 1) ? 's' : '') . " for this IP ]";
}
else {
return "$ban_tip
[ {$ban_summary['total']} ban" .
(($ban_summary['total'] > 1) ? 's' : '') . " for this Pass ]";
}
}
function ban_post( $no, $globalban, $length, $reason, $is_threadban = 0 )
{
$query = mysql_board_call( "SELECT HIGH_PRIORITY * FROM `" . SQLLOG . "` WHERE no=" . intval( $no ) ); //FIXME use assoc
$row = mysql_fetch_assoc( $query );
if( !$row ) return "";
extract( $row, EXTR_OVERWRITE );
//list( $no, $sticky, $permasage, $closed, $now, $name, $email, $sub, $com, $host, $pwd, $filename, $ext, $w, $h, $tn_w, $tn_h, $tim, $time, $md5, $fsize, $root, $resto ) = $row;
$name = str_replace( ' !', ' #', $name );
$name = preg_replace( '/<[^>]+>/', '', $name ); // remove all remaining html crap
if( $host ) $reverse = gethostbyaddr( $host );
$displayhost = ( $reverse && $reverse != $host ) ? "$reverse ($host)" : $host;
$xff = '';
//$xffresult = mysql_board_call("select host from xff where board='%s' and postno=%d", BOARD_DIR, $no);
//$xffresult = mysql_global_call( "SELECT xff from xff where board='%s' AND postno='%d'", BOARD_DIR, $no );
//if( $xffrow = mysql_fetch_row( $xffresult ) ) {
// $xff = $xffrow[ 0 ];
// $xff_reverse = gethostbyaddr($xffrow[0]);
// $xff = ($xff_reverse && $xff_reverse!=$xffrow[0])?"$xff_reverse ($xff)":$xff;
//}
$board = BOARD_DIR;
$zonly = 0;
$bannedby = $_COOKIE[ '4chan_auser' ];
$pass_id = $row[ '4pass_id' ];
$post_json = make_post_json($row);
$result = mysql_global_do(
"INSERT INTO " . SQLLOGBAN . "
(board,global,zonly,name,host,reverse,xff,reason,length,admin,md5,4pass_id,post_num,post_time,post_json,admin_ip)
VALUES
( '%s', %d, %d, '%s', '%s', '%s', '%s', '%s', %d, '%s', '%s', '%s', %d, FROM_UNIXTIME(%d), '%s', '%s')",
$board, $globalban, $zonly, $name, $host, $reverse, $xff, $reason, $length, $bannedby, $md5, $pass_id, $no, $time, $post_json, $_SERVER['REMOTE_ADDR'] );
//('" . $board . "','" . $globalban . "','" . $zonly . "','" . mysql_escape_string( $name ) . "','" . $host . "','" . mysql_escape_string( $reverse ) . "','" . mysql_escape_string( $xff ) . "','" . mysql_escape_string( $reason ) . "','$length','" . mysql_escape_string( $bannedby ) . "','$md5','$pass_id',$no,FROM_UNIXTIME('$time'), '%s')", $post_json ) ) {
if( !$result ) {
echo S_SQLFAIL;
}
/*if( $ext != '' ) {
$salt = file_get_contents( SALTFILE );
$hash = sha1( BOARD_DIR . $no . $salt );
@copy( THUMB_DIR . "{$tim}s.jpg", BANTHUMB_DIR . "{$hash}s.jpg" );
}*/
/*
$afsize = (int)( $fsize > 0 );
validate_admin_cookies();
if( $is_threadban ) mysql_global_do( "INSERT INTO " . SQLLOGDEL . " (imgonly,postno,resto,board,name,sub,com,img,filename,admin,admin_ip) values('0',%d,%d,'%s','%s','%s','%s','%d','%s','%s','%s')", $no, $resto, SQLLOG, $name, $sub, $com, $afsize, $filename.$ext, $bannedby, $_SERVER['REMOTE_ADDR'] ); // FIXME do all this in one insert outside the write lock
*/
echo "$displayhost banned.
\n";
return $host;
}
function cpban($no) {
$no = (int)$no;
if (!$no) {
die('Invalid thread number.');
}
$op_reason = htmlspecialchars($_POST['op_reason']);
$rep_reason = htmlspecialchars($_POST['rep_reason']);
if (!$op_reason || !$rep_reason) {
die('Ban reason cannot be empty.');
}
$op_days = (int)$_POST['op_days'];
$rep_days = (int)$_POST['rep_days'];
if ($op_days < 0 || $rep_days < 0 || $op_days > 9999 || $rep_days > 9999) {
die('Invalid ban length.');
}
$op_ban_end = date('YmdHis', time() + $op_days * (24 * 60 * 60));
$rep_ban_end = date('YmdHis', time() + $rep_days * (24 * 60 * 60));
$op_host = ban_post($no, 1, $op_ban_end, "$op_reason<>Thread Ban No.$no", 1);
if (!$op_host) {
die("Thread $no doesn't exist.");
}
$query = mysql_board_call("SELECT no, host FROM `" . SQLLOG . "` WHERE resto = $no AND host != '$op_host' GROUP BY host");
while ($row = mysql_fetch_assoc($query)) {
ban_post($row['no'], 1, $rep_ban_end, "$rep_reason<>Thread Ban No.$no", 1);
}
delete_post($no, false, null, 'threadban');
echo 'Done.
';
}
function delete_post($no, $imgonly, $template_id = null, $tool = null) {
$url = "/".BOARD_DIR."/post";
$post = array(
'mode' => 'usrdel',
'onlyimgdel' => $imgonly ? 'on' : '',
$no => 'delete',
'remote_addr' => $_SERVER['REMOTE_ADDR']
);
if ($template_id) {
$post['template_id'] = $template_id;
}
if ($tool) {
$post['tool'] = $tool;
}
rpc_start_request("https://sys.int$url", $post, $_COOKIE, true);
// don't bother waiting to check for errors
return true;
}
function archive_thread($thread_id) {
$url = "/".BOARD_DIR."/post";
$post = array(
'mode' => 'forcearchive',
'id' => $thread_id
);
rpc_start_request("https://sys.int$url", $post, $_COOKIE, true);
// don't bother waiting to check for errors
return true;
}
function move_thread($thread_id, $board) {
$url = "/".BOARD_DIR."/post";
$post = array(
'mode' => 'movethread',
'id' => $thread_id,
'board' => $board
);
rpc_start_request("https://sys.int$url", $post, $_COOKIE, true);
// don't bother waiting to check for errors
return true;
}
function rebuild_thread($no, &$error = '', $is_archived = false) {
$url = '/' . BOARD_DIR . '/post';
if (!$is_archived) {
$post = array(
'mode' => 'rebuildadmin',
'no' => $no
);
}
else {
$post = array();
$post['mode'] = 'rebuild_threads_by_id';
$post['ids'] = array($no);
$post = http_build_query($post);
}
rpc_start_request("https://sys.int$url", $post, $_COOKIE, true);
return true;
}
function rebuild_all(&$error = '') {
$url = '/' . BOARD_DIR . '/post';
$post = array(
'mode' => 'rebuildall'
);
rpc_start_request("https://sys.int$url", $post, $_COOKIE, true);
return true;
}
function dir_contents( $dir )
{
$d = opendir( $dir );
$a = array();
if( !$d ) return $a;
while( ( $f = readdir( $d ) ) !== false ) {
if( $f == "." || $f == ".." || $f == "" ) continue;
$a[ ] = $f;
}
closedir( $d );
return $a;
}
function clean()
{
// Survive oversized boards.
set_time_limit(0);
ini_set("memory_limit", "-1");
$images = array();
$respages = array();
$indexpages = array();
if( PAGE_MAX > 0 ) {
print "Running cleanup...
Pruning orphaned posts...
";
$result = mysql_board_call( "select no from `%s` where resto>0 and resto not in (select no from `%s` where resto=0)", SQLLOG, SQLLOG );
$nos = mysql_column_array( $result );
if( count( $nos ) ) {
mysql_board_call( "delete from `" . SQLLOG . "` where no in (%s)", implode( $nos, "," ) );
foreach( $nos as $no ) {
print "$no pruned
";
}
}
}
//clearstatcache();
// get list of images that should exist
if (MOBILE_IMG_RESIZE) {
$cols = ',m_img'; // FIXME, only because not all boards have that column
}
$result = mysql_board_call( "select tim,filename,ext$cols from `" . SQLLOG . "` where ext != ''" );
while( $row = mysql_fetch_array( $result ) ) {
if( $row[ 'ext' ] == '.swf' ) {
$images[ "{$row[ 'filename' ]}{$row[ 'ext' ]}" ] = 1;
}
else {
$images[ "{$row[ 'tim' ]}{$row[ 'ext' ]}" ] = 1; // picture
$images[ "{$row[ 'tim' ]}s.jpg" ] = 1; // thumb
if (ENABLE_OEKAKI_REPLAYS) {
$images["{$row['tim']}.tgkr"] = 1; // oe animation
}
if (MOBILE_IMG_RESIZE) {
$images["{$row['tim']}m.jpg"] = 1; // resized
}
}
}
// get list of res pages that should exist
$result = mysql_board_call( "select no from `" . SQLLOG . "` where resto=0" );
while( $row = mysql_fetch_array( $result ) ) {
if( USE_GZIP == 1 ) {
$respages[ "{$row[ 'no' ]}.html.gz" ] = 1;
if (ENABLE_JSON) {
$respages[$row['no'] . '.json.gz'] = 1;
if (JSON_TAIL_SIZE) {
$respages[$row['no'] . '-tail.json.gz'] = 1;
}
}
}
else {
$respages[ "{$row[ 'no' ]}.html" ] = 1;
if (ENABLE_JSON) {
$respages[$row['no'] . '.json'] = 1;
if (JSON_TAIL_SIZE) {
$respages[$row['no'] . '-tail.json'] = 1;
}
}
}
if( JANITOR_BOARD ) $respages[ $row[ 'no' ] . '.html.php' ] = 1;
}
print "Cleaning src dir...
";
foreach( dir_contents( IMG_DIR ) as $filename ) {
if( $images[ $filename ] != 1 && !preg_match('/dmca_/', $filename) && $filename !== 'src') {
print "Deleted $filename
";
//if (file_exists(IMG_DIR . "$filename")) {
unlink(IMG_DIR . "$filename") or print "Couldn't delete!
";
//}
}
}
print "Cleaning thumb dir...
";
foreach( dir_contents( THUMB_DIR ) as $filename ) {
if( $images[ $filename ] != 1 && !preg_match('/dmca_/', $filename)) {
print "Deleted $filename
";
//if (file_exists(THUMB_DIR . "$filename")) {
unlink(THUMB_DIR . "$filename") or print "Couldn't delete!
";
//}
}
}
print "Cleaning res dir...
";
foreach( dir_contents( RES_DIR ) as $filename ) {
if( $respages[ $filename ] != 1 ) {
print "Deleted $filename
";
unlink( RES_DIR . "$filename" ) or print "Couldn't delete!
";
}
}
print "Cleaning index pages...
";
$result = mysql_board_call( "SELECT COUNT(*) from `" . SQLLOG . "` WHERE archived = 0 AND resto = 0" );
$lastpage = PAGE_MAX + 1;//(mysql_result( $result, 0, 0 ) / DEF_PAGES) + 1;
if( USE_GZIP == 1 ) {
$indexpages[ SELF_PATH2_FILE . '.gz' ] = 1;
if (USE_RSS) {
$indexpages[INDEX_DIR . 'index.rss.gz'] = 1;
}
if (ENABLE_CATALOG) {
$indexpages[INDEX_DIR . 'catalog.html.gz'] = 1;
}
if (ENABLE_JSON_CATALOG) {
$indexpages[INDEX_DIR . 'catalog.json.gz'] = 1;
}
if (ENABLE_JSON_THREADS) {
$indexpages[INDEX_DIR . 'threads.json.gz'] = 1;
$indexpages[INDEX_DIR . 'archive.json.gz'] = 1;
}
if (ENABLE_ARCHIVE) {
$indexpages[INDEX_DIR . 'archive.html.gz'] = 1;
}
}
$indexpages[ SELF_PATH2_FILE ] = 1;
if (USE_RSS) {
$indexpages[INDEX_DIR . 'index.rss'] = 1;
}
if (ENABLE_CATALOG) {
$indexpages[INDEX_DIR . 'catalog.html'] = 1;
}
if (ENABLE_JSON_CATALOG) {
$indexpages[INDEX_DIR . 'catalog.json'] = 1;
}
if (ENABLE_JSON_THREADS) {
$indexpages[INDEX_DIR . 'threads.json'] = 1;
$indexpages[INDEX_DIR . 'archive.json'] = 1;
}
if (ENABLE_ARCHIVE) {
$indexpages[INDEX_DIR . 'archive.html'] = 1;
}
for( $page = 1; $page < $lastpage; $page++ ) {
if( USE_GZIP == 1 ) {
$indexpages[ INDEX_DIR . $page . PHP_EXT . '.gz' ] = 1;
if (ENABLE_JSON_INDEXES) {
$indexpages[INDEX_DIR . $page . '.json.gz'] = 1;
}
}
$indexpages[ INDEX_DIR . $page . PHP_EXT ] = 1;
if (ENABLE_JSON_INDEXES) {
$indexpages[INDEX_DIR . $page . '.json'] = 1;
}
}
foreach( glob( INDEX_DIR . '*.{html,gz}', GLOB_BRACE ) as $filename ) {
$bfilename = basename( $filename );
if( $indexpages[ $filename ] != 1 ) {
print "Deleted $bfilename
";
unlink( $filename ) or print "Couldn't delete!
";
}
}
print "Cleaning tmp uploads...
";
$phptmp = ini_get( "upload_tmp_dir" );
exec( "find $phptmp/ -mtime +2h -name php*", $tmpfiles );
exec( "find -E " . INDEX_DIR . " -regex '.*/(gz)?tmp.*$' -mtime +2h", $indextmp );
exec( "find -E " . RES_DIR . " -regex '.*/(gz)?tmp.*$' -mtime +2h", $restmp );
$tmpfiles = array_merge( $tmpfiles, $indextmp );
$tmpfiles = array_merge( $tmpfiles, $restmp );
foreach( $tmpfiles as $filename ) {
$safename = explode( '/' . BOARD_DIR . '/', $filename );
$safename = end( $safename );
print "Deleted $safename
";
unlink( $filename ) or print "Couldn't delete!
";
}
/*print "Cleaning /var/tmp
";
exec("find /var/tmp/ -mtime +2h -type f", $tmpfiles);
foreach($tmpfiles as $filename) {
print "Delete $filename
"; unlink($filename) or print "Couldn't delete!
";
}*/
print "Cleaning up side tables...
";
mysql_global_call( "DELETE FROM user_actions WHERE time < DATE_SUB(NOW(), INTERVAL 7 DAY)" );
mysql_global_call( "DELETE FROM event_log WHERE created_on < DATE_SUB(NOW(), INTERVAL 7 DAY)" );
mysql_global_call( "DELETE FROM xff WHERE tim < (unix_timestamp(DATE_SUB(NOW(), INTERVAL 7 DAY))*1000)" );
mysql_board_call( "DELETE FROM f_md5 WHERE now < DATE_SUB(NOW(), INTERVAL 2 DAY)" );
mysql_board_call("DELETE FROM r9k_posts WHERE created_on < DATE_SUB(NOW(), INTERVAL 2 YEAR)");
print "Cleanup complete!";
}
// Changes relative board urls to absolute //sys.4chan.org admin urls
function fix_board_nav($nav) {
return preg_replace('/href="\/([a-z0-9]+)\/"/', "href=\"//sys." . L::d(BOARD_DIR) . "/$1/admin\"", $nav);
}
/* head */
function head( &$dat, $is_logged_in = false )
{
global $admin, $access_allow, $access_deny;
$allowed_modes = array('ban', 'delall', 'unban', 'opt', 'banreq', 'editop');
if( !is_user() || ( is_user() && ( $admin != "ban" ) && ( $admin != "delall" ) && ( $admin != "unban" ) && ( $admin != "opt" ) && ( $admin != 'banreq' ) && ( $admin != 'editop' ) ) ) {
$navinc = fix_board_nav(file_get_contents( NAV_TXT )) . '
';
$navinc = str_replace( '[Settings] ', '', $navinc );
}
if (DEFAULT_BURICHAN) {
$style_cookie = 'ws_style';
$ws = 'ws';
}
else {
$style_cookie = 'nws_style';
$ws = '';
}
$preferred_style = $_COOKIE[$style_cookie];
switch ($preferred_style) {
case 'Yotsuba New':
$style = 'yotsubanew';
break;
case 'Yotsuba B New':
$style = 'yotsubluenew';
break;
//case 'Futaba New':
// $style = 'futabanew';
// break;
//case 'Burichan New':
// $style = 'burichannew';
// break;
case 'Tomorrow':
$style = 'tomorrow';
break;
case 'Photon':
$style = 'photon';
break;
default:
$style = DEFAULT_BURICHAN ? 'yotsubluenew' : 'yotsubanew';
break;
}
if (!in_array($admin, $allowed_modes)) {
$admin = '';
}
if ($admin == 'ban') {
$page_title = 'Ban No.' . (int)$_GET['id'] . ' on /' . BOARD_DIR . '/';
$no_header = true;
}
else if ($admin == 'banreq') {
$page_title = 'Ban request No.' . (int)$_GET['id'] . ' on /' . BOARD_DIR . '/';
$no_header = true;
}
else {
$page_title = TITLE;
$no_header = isset($_GET['noheader']);
}
$fb_js = <<';
document.body.insertBefore(el, document.body.firstElementChild);
},
hideMessage: function() {
var el = document.getElementById('feedback');
if (el) {
document.body.removeChild(el);
}
},
checkTemplate: function(id) {
var tpl;
Feedback.hideMessage();
if (id < 0) {
return;
}
tpl = window.templates[id];
if (tpl.no == '1') {
Feedback.showMessage('Only use this ban template for images depicting apparent child pornography. For links and non-pornographic images, please use the appropriate template(s).');
}
else if (tpl.no == '123' || tpl.no == '126') {
Feedback.showMessage('Images depicting apparent child pornography should be banned using the "Child Pornography (Explicit Image)" template.');
}
}
};
JS;
$tooltip_js = << document.documentElement.clientWidth) {
left = rect.left - el.offsetWidth + t.offsetWidth + 2;
el.className += '-left';
}
top = rect.top - el.offsetHeight - 5;
style = el.style;
style.display = 'none';
style.top = (top + window.pageYOffset) + 'px';
style.left = left + window.pageXOffset + 'px';
style.display = '';
Tip.node = el;
},
hide: function() {
if (Tip.node) {
document.body.removeChild(Tip.node);
Tip.node = null;
}
}
}
Tip.init();
JS;
$dat .= '
' . $page_title . '
';
if (!$no_header) {
$dat .= '
' . str_replace( "12pt", "10pt", $navinc ) . '
';
}
}
/* Footer */
function foot( &$dat )
{
$dat .= '
' . S_FOOT . '
wtf?
' . str_replace( "12pt", "10pt", $navinc2 ) . '
';
}
function error( $mes, $dest = '' )
{
global $upfile_name;
if ($dest && file_exists($dest)) {
unlink($dest);
}
head( $dat );
echo $dat;
echo "
$mes
[" . S_RELOAD . "]";
die( "