} ?> </table> </td></tr> </table> </td></tr> </table> <?php admin_footer(); exit; } elseif ($admin_action == 'ques_edit') { if ($_POST['ctype'] == 'edit_submit') { $qid = intval($_POST['qid']); $sid = intval($_POST['sid']); $page = intval($_POST['page']); $title = filters_title($_POST['title']); $content = filters_content($_POST['content']); $dblink->query("UPDATE {$dbprefix}ques SET title='{$title}',content='{$content}' where qid={$qid}"); header("location:admin.php?admin_action={$backaction}&sid={$sid}&page={$page}"); } else { $qid = intval($_GET['qid']); $query = $dblink->query("SELECT qid,title,content FROM {$dbprefix}ques WHERE qid={$qid}"); $row = $dblink->fetch_array($query); $row['content'] = filters_outcontent($row['content']); $row['content'] = htmlspecialchars($row['content']); admin_header(); ?> <table cellspacing="1" cellpadding="0" width="760" align="center" class="tableborder"> <tr><td> <table border="0" cellspacing="0" cellpadding="4" width="100%"> <tr class="header"><td height="22"><?php
} else { show_message('class_error', ''); exit; } $give_score = intval($_POST['givescore']); if ($give_score) { $my_score = get_score($cyask_uid); if ($give_score > $my_score) { show_message('score_error', ''); exit; } else { update_score($cyask_uid, $give_score, '-'); //┐█ио } } $ques_title = filters_title($_POST['qtitle']); $ques_supplement = filters_content($_POST['qsupply']); $ques_hidanswer = $_POST['hidanswer'] ? 1 : 0; $overdue_days = intval($overdue_days); $endtime = $timestamp + $overdue_days * 86400; $sql = "INSERT INTO {$tablepre}question SET sid='{$sid}',sid1='{$sid1}',sid2='{$sid2}',sid3='{$sid3}',uid='{$cyask_uid}',username='******',title='{$ques_title}',score='{$give_score}',asktime='{$timestamp}',endtime='{$endtime}',hidanswer='{$ques_hidanswer}'"; if ($dblink->query($sql)) { $qid = $dblink->insert_id(); } $do = $dblink->query("INSERT INTO {$tablepre}question_1 SET qid='{$qid}',supplement='{$ques_supplement}'"); if ($do) { header("location:signal.php?resultno=101&url={$url}"); exit; } else { show_message('ask_error', 'ask.php?word=' . $word); exit;