#============================================== # RAYBOARD [PHP版] Ver 0.75 # # Copyright (C) 2004, by unastray ( sei ) # All rights reserved # # URL: http://unastray.com/ # #============================================== require './user-init.php'; require './skin-init.php'; # skin設定ファイルへのパス #===============================# #----------設定終わり-----------# $LOCK; if($Datesort){ $Upsort = 0; } #======================== # メイン処理 #======================== #...... 初期化 ..............................# // get送信時 if ($_SERVER["REQUEST_METHOD"] != "POST"){ while(list ($key, $val) = each($_GET)) { $_POST[$key] = $val; } } #...... 初期化2 .............................# $MASTER = 0; if($_POST['pass']){ $MASTER = ($_POST['pass'] == $Mpass) ? 1 : 0; $_POST['epass'] = crypt($_POST['pass']); } else if ($_POST['epass']){ $MASTER = decry($Mpass , $_POST['epass']); if($_POST['pass'] == $Mpass){ $MASTER = 1;} } if($MASTER && $_POST['su']) { $SU = 1; } #========= main ============================================= switch ($_POST['mode']) { case "res": res(); break; case "write": Write(); break; case "delete": Delete(); break; case "edit": Edit(); break; case "ewrite": Edit(); break; case "accept": Edit(); break; case "admin": Admin(); break; case "master": Master(); break; case "search": SearchView();break; case "mres": MasterResform(); break; case "reviseCnt": reviseCnt();break; case "viewIcon": viewIcon();break; case "change_init": change_init(); break; } Index(); exit(0); #============================================================================ # setValue #============================================================ # = # メイン画面の表示 = # = #============================================================ function openSkin($name){ global $Skin_main, $Skin_res, $Skin_edit, $Skin_srch, $Skin_form, $Skin_last, $Skin_error; $file = ($name == 'main') ? $Skin_main : (($name == 'res') ? $Skin_res : (($name == 'edit') ? $Skin_edit : (($name == 'search') ? $Skin_srch : (($name == 'form') ? $Skin_form : (($name == 'error') ? $Skin_error : (($name == 'last') ? $Skin_last : Error("mistake", 1))))))); if($fp = fopen("$file", "r")){ while( !feof($fp) ) { $data .= fgets($fp, 9182); } fclose($fp); } else { Error("Can't open $file.", 1);} return $data; } function Index() { global $View, $Log_file, $Lskin_from, $Fskin_from, $Last_View; $lastname; $lastdate; $rescnt; $tmp_rfoot; $delimiter = time(); $count = 0; $flag = 0; $start = $View * $_POST['page'] + 1; $fin = $start + $View - 1; $lines = array(); if($_POST['mode'] == 'last'){ $from = ($Lskin_from) ? $Lskin_from : 'last'; } else if ($_POST['mode'] == 'form') { $from = ($Fskin_from) ? $Fskin_from : 'form'; } else { $_POST['mode'] = $from = 'main'; } if($_POST['mode'] == 'last'){ $start = 1; $fin = $Last_View; } /*-----スキン読み込み--------------------*/ $skin_data = openSkin($from); /*-----ログ読み込み----------------------*/ $lines = file($Log_file); list(,,$oyacnt,,,,) = explode(",", array_shift($lines)); /*-----スキン分割------------------------*/ list($head, $form, $rhead, $rbody, $rfoot, $foot) = explode("", $skin_data); //第一変換 $tmp_formfoot = $form . $delimiter .$foot; changeForm($tmp_formfoot); changeFoot($tmp_formfoot, $oyacnt, $fin); if($_POST['mode'] == 'last') $tmp_formfoot = preg_replace("/