echo "Current Status: <select name='status'>"; foreach ($statusArray as $status) { echo "<option value='{$status}'"; if (strcmp($row[current_status], $status) == 0) { echo " selected"; } echo ">{$status}</option>"; } echo "</select> <br/>"; echo "<input type='hidden' name='id' value='{$row['id']}'/>"; echo "<input type='submit' name='editConfirm' value='Confirm'/>"; echo "<input type='submit' name='delete' value='Delete' onclick='return confirm("Are you sure?")'/>"; echo "</form>"; if (strcmp($_GET['editConfirm'], 'Confirm') == 0) { $project = mysql_real_escape_string($_GET['project']); $custID = mysql_real_escape_string($_GET['client']); $status = mysql_real_escape_string($_GET['status']); mysql_query("UPDATE projects SET project_name = '{$project}', client_id = {$custID}, current_status = '{$status}'\n WHERE id = {$id}"); echo '<META HTTP-EQUIV="Refresh" Content="0; URL=start.php">'; } if (strcmp($_GET['delete'], 'Delete') == 0) { date_default_timezone_SET('America/New_York'); $time_deleted = date('Y-m-d H:i:s'); mysql_query("UPDATE projects SET time_deleted = '{$time_deleted}' WHERE id = {$id}"); echo '<META HTTP-EQUIV="Refresh" Content="0; URL=start.php">'; } mysql_close($con); ?> </body> </html>
<?php require_once "db.inc.php"; require_once "/home/vhosts/rpg.su/web/inc/lib.inc.php"; require_once "/home/vhosts/rpg.su/web/class/class_item.php"; require_once "/home/vhosts/rpg.su/web/class/class_res.php"; define('img_domain', 'images.rpg.su'); date_default_timezone_SET('Europe/Moscow'); function send_error($error, $theme = 'Ошибка в скриптах') { if ($theme != 'Ошибка в скриптах') { $kol = mysql_result(mysql_query("SELECT COUNT(*) FROM game_pm WHERE komu=612 AND view=0 AND theme='" . $theme . "'"), 0, 0); } else { $kol = 0; } if ($kol == 0) { myquery("INSERT INTO game_pm (komu, otkogo, theme, post, view, clan, time) VALUES ('612', '0', '{$theme}', '" . mysql_real_escape_string($error) . "', '0','0'," . time() . ")"); } if ($theme != 'Ошибка в скриптах') { $kol = mysql_result(mysql_query("SELECT COUNT(*) FROM game_pm WHERE komu=14475 AND view=0 AND theme='" . $theme . "'"), 0, 0); } else { $kol = 0; } if ($kol == 0) { myquery("INSERT INTO game_pm (komu, otkogo, theme, post, view, clan, time) VALUES ('14475', '0', '{$theme}', '" . mysql_real_escape_string($error) . "', '0','0'," . time() . ")"); } } SET_error_handler('error_handler', E_ALL); function error_handler($errNo, $errStr, $errFile, $errLine) { $handlers = ob_list_handlers();