STnavi 情報館 ver.2.12

F = datas/kobanmodify.php
2014-11-26 22:37:29 更新
INDEX

$encode = "UTF-8";
$title = "STnavi - 香盤データ修正";
$thisprog = "kobanmodify.php";
$lastupdate = date("Y-m-d H:i", filemtime($thisprog));
$br = '
';

include 'functions.inc';
$uid = getparam('uid', '');
$pw = getparam('pw', '');
$uid = checkcookie('uid', $uid);
$pw = checkcookie('pw', $pw);

$dbhost = 'localhost';
$dbuser = 'stnavi';
$dbpass = 'cubie';
$dbname = 'stnavi';


print '';
print '';
print '';
print '' . $title . '';
print '';
print '';
print '';
print '';
$kubun = checkuser($uid, $pw);
if (!$uid) $uid = 'ゲスト';
print $uid . 'さん ' . $kubun . 'モード';
print '

' . $title . '

';
$id = getparam('id', ''); // 修正対象データ
$step = getparam('step', 1);

print linkbutton('top.php', 'トップページ', $uid, $pw);

$dbtbl = 'kobandata';
$db = mysql_connect($dbhost, $dbuser, $dbpass);
if (!$db) die('データベースへの接続に失敗しました。' . mysql_error());
mysql_query('SET NAMES utf8' , $db);
$dbselect = mysql_select_db($dbname, $db);
if (!dbselect) die('データベースの選択に失敗しました。' . mysql_error());

if ($step == 2) {
$id = getparam('id');

$shonichi = getparam('shonichi');
$rakubi = getparam('rakubi');
$or31 = getparam('or31');
$jun = getparam('jun');
$flag = getparam('flag');
$gekijo = getparam('gekijo');
$odoriko = getparam('odoriko');
$enmoku = getparam('enmoku');
$fuka = getparam('fuka');

$query = 'UPDATE `stnavi`.`kobandata` SET ';
$query .= "`shonichi` = '" . $shonichi . "', ";
$query .= "`rakubi` = '" . $rakubi . "', ";
$query .= "`or31` = '" . $or31 . "', ";
$query .= "`jun` = '" . $jun . "', ";
$query .= "`flag` = '" . $flag . "', ";
$query .= "`gekijo` = '" . $gekijo . "', ";
$query .= "`odoriko` = '" . $odoriko . "', ";
$query .= "`enmoku` = '" . $enmoku . "', ";
$query .= "`fuka` = '" . $fuka . "' ";
$query .= ' WHERE `kobandata`.`id` =' . $id . ';';
$result = mysql_query($query);
if (!$result) die('クエリー失敗。' . mysql_error());

$query = 'SELECT * FROM `' . $dbtbl . '` WHERE `id` = ' . $id;
echo "Query : " . $query . $br . $br;
$result = mysql_query($query);
if (!$result) die('クエリー失敗。' . mysql_error());

$row = mysql_fetch_assoc($result);
if ($row['flag'] == 'D') print '';
print 'id=' . $row['id'] . ' ' . $row['shonichi'] . '~';
print $row['rakubi'] . $row['or31'] . ' ';
print $row['jun'] . '.';
print $row['gekijo'] . ' ';
if ($row['flag'] != 'T') print '(';
print $row['odoriko'];
if ($row['flag'] != 'T') print ')';
if ($row['enmoku']) print $row['enmoku'];
if ($row['fuka']) print $row['fuka'];
if ($row['flag'] == 'D') print '
';
print '

修正しました
';

}

if ($step == 1) {
$query = 'SELECT * FROM `' . $dbtbl . '` WHERE `id` = ' . $id;
echo "Query : " . $query . $br . $br;
$result = mysql_query($query);
if (!$result) die('クエリー失敗。' . mysql_error());

$row = mysql_fetch_assoc($result);
print '
';
print 'id = ' . $row['id'] . $br;
print '';
print '初日 :  yyyy-mm-dd
';
print '楽日 : ';
print '
';
print '香盤順: フラグ:';
print ' T:劇場告知、G:踊り子情報、(空欄):削除
';
print '劇場名:
';
print '踊り子名:
';
print '演目:
';
print '付加情報:
';
print '';
print '';
print '
';
}

print $br . $br;
mysql_close($db);


print '劇場一覧  ';
print '踊り子一覧  ';
print $br . $br;
print linkbutton('kobanjoho.php', '再検索', $uid, $pw);
if ($kubun != 'ゲスト') {
print linkbutton('add-koban.php', '香盤情報追加', $uid, $pw);
}
print '';
print ' ページトップへ';
print '

';

if ($uid == 'ゲスト') include 'login.inc';
print footer($uid, $pw, $thisprog);
if (checkuser($uid, $pw) == '管理者') include 'kanrisha.inc';
print '';
print '';

?>

Copyright ©2013-2025 Libra0977.   All Rights Reserved.   last updated 2014.8/25.
Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)