|
From: <smi...@us...> - 2004-01-02 17:32:30
|
Update of /cvsroot/devil-linux/web/polls/admin In directory sc8-pr-cvs1:/tmp/cvs-serv15591/polls/admin Added Files: admin_comment.php admin_edit.php admin_help.php admin_index.php admin_license.php admin_login.php admin_new.php admin_options.php admin_pwd.php admin_settings.php admin_stat.php Log Message: added polls --- NEW FILE: admin_comment.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $poll_result = $db_connect->query("SELECT * FROM $sql_index WHERE (poll_id = '$poll_id')"); $record = $db_connect->fetch_array($poll_result); $question = htmlspecialchars($record['question']); $db_connect->free_result($poll_result); $config_result = $db_connect->query("SELECT base_gif as base_gif, time_offset as time_offset, lang as lang, entry_pp as entry_pp FROM $sql_config WHERE (config_id = '1')"); $record = $db_connect->fetch_array($config_result); $time_offset = $record["time_offset"]*3600; $base_gif = $record["base_gif"]; $lang = $record["lang"]; $entry_pp = $record["entry_pp"]; $db_connect->free_result($config_result); $sql_result = $db_connect->query("select count(*) as total from $sql_com WHERE (poll_id = '$poll_id')"); $db_connect->fetch_array($sql_result); $total = $db_connect->record['total']; $db_connect->free_result($sql_result); include ("./lang/$lang"); if(!isset($entry)) { $entry = 0; } $next_page = $entry+$entry_pp; $prev_page = $entry-$entry_pp; $navigation =''; if ($prev_page >= 0) { $navigation = " <img src=\"$base_gif/back.gif\" width=\"16\" height=\"14\"> <a href=\"$PHP_SELF?log_in=$log_in&action=comments&id=$poll_id&entry=$prev_page\">$NavPrev</a>\n"; } if ($next_page < $total) { $navigation = $navigation. " <a href=\"$PHP_SELF?log_in=$log_in&action=comments&id=$poll_id&entry=$next_page\">$NavNext</a> <img src=\"$base_gif/next.gif\" width=\"16\" height=\"14\">\n"; } header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- a {text-decoration: none} .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} a:hover { color: #FF0033; text-decoration: underline} --> </style> <script language="Javascript"> <!-- function del_entry(entry) { if (window.confirm("<?php echo $ComDel; ?>")) { window.location.href = "http://"+window.location.host+window.location.pathname+"?log_in=<?php echo $log_in; ?>&action=remove&id=<?php echo $poll_id; ?>&mess_id="+entry+"&no_cache="+Math.random() } } // --> </script> </head> <body bgcolor="#009999" link="#000000" vlink="#000000"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <table border="0" cellspacing="1" cellpadding="3" width="100%"> <tr> <td class="td1" colspan="3" height="30"> <img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $question; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="250" height="18"></td> </tr> <tr> <td width="200" class="td2"><?php echo $ComTotal; ?>: <b><font color="#006699"><?php echo $total; ?></font></b></td> <td colspan="2" class="td2" align="right"><?php echo $navigation; ?></td> </tr> <tr> <td width="200" bgcolor="#999999" class="td2"><b><?php echo $ComName; ?></b></td> <td width="457" class="td2" bgcolor="#999999" valign="top"><b><?php echo $IndexCom; ?></b></td> <td width="66" class="td2" bgcolor="#999999" valign="top"> </td> </tr> <?php $results = $db_connect->query("select * from $sql_com WHERE (poll_id = '$poll_id') order by com_id desc limit $entry, $entry_pp"); while ($row = $db_connect->fetch_array($results)) { $date = date("j-M-Y H:i",$row['time']+$time_offset); $row['message'] = nl2br($row['message']); echo " <tr> <td width=\"200\" bgcolor=\"#CCCCCC\" valign=\"top\"> <table width=\"200\" border=\"0\" cellspacing=\"0\" cellpadding=\"3\"> <tr> <td><img src=\"$base_gif/host.gif\" width=\"16\" height=\"15\">"; if (eregi("Opera",$row['browser'])) { $image = "$base_gif/opera.gif"; } elseif (eregi("MSIE",$row['browser'])) { $image = "$base_gif/msie.gif"; } elseif (eregi("Mozilla",$row['browser'])) { $image = "$base_gif/netscape.gif"; } else { $image = "$base_gif/unknown.gif"; } echo " <img src=\"$image\" width=\"16\" height=\"16\" alt=\"$row[browser]\">\n"; if ($row['email']) { echo " <a href=\"mailto:$row[email]\"><img src=\"$base_gif/email.gif\" width=\"15\" height=\"15\" border=\"0\" alt=\"$row[email]\"></a>\n"; } echo " </td> </tr> <tr><td class=\"td2\"><font color=\"#990033\">$row[name]</font></td></tr> <tr><td class=\"td2\">$row[host]</td></tr> </table> </td> <td width=\"457\" class=\"td2\" bgcolor=\"#E6E6E6\" valign=\"top\"><img src=\"$base_gif/post.gif\" width=\"9\" height=\"9\">$ComPost: $date <hr size=\"1\" noshade>$row[message] </td> <td width=\"66\" class=\"td2\" align=\"center\"><a href=\"javascript:del_entry($row[com_id])\">$IndexDel</a></td> </tr>\n"; } ?> <tr bgcolor="#CCCCCC"> <td width="200" class="td2"><?php echo $SetEntry; ?>: <b><font color="#006699"><?php echo $entry_pp; ?></font></b></td> <td colspan="2" class="td2" align="right"> <?php echo $navigation; ?></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_edit.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $poll_result = $db_connect->query("SELECT * FROM $sql_index WHERE (poll_id = '$entry_id')"); $row = $db_connect->fetch_array($poll_result); $question = htmlspecialchars($row['question']); $db_connect->free_result($poll_result); $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; $db_connect->free_result($config_result); include ("./lang/$result[lang]"); $result = $db_connect->query("select * from $sql_data where (poll_id = '$entry_id') order by option_id asc"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} .input { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; width: 350px} .exp_input { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; width: 30px} .button { font-family: Arial, Helvetica, sans-serif; font-size: 9pt} .input2 { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; width: 80px} .select { font-family: Arial, Helvetica, sans-serif; font-size: 9pt} a:hover { color: #FF0033; text-decoration: underline} --> </style> <script language="JavaScript"> <!-- blank = new Image(); blank.src = "<?php echo $base_gif; ?>/blank.gif"; <?php $source_array = array( "aqua","blue","brown","darkgreen","gold","green","grey","orange","pink","purple","red","yellow" ); for ($i=0;$i<sizeof($source_array); $i++) { echo "$source_array[$i] = new Image(); $source_array[$i].src = \"$base_gif/$source_array[$i].gif\";\n"; } ?> function ChangeBar(sel,img) { eval("document.bar"+img+".src="+sel+".src"); } function ResetPoll() { for (i=4; i<document.forms[0].elements.length-6; i+=3) { document.forms[0].elements[i].value = '0'; } } function CheckDays() { if(!(document.poll.exp_time.value >= 0)) { alert("<?php echo $SetEmpty; ?>"); document.poll.exp_time.focus(); return false; } } //--> </script> </head> <body bgcolor="#009999" link="#000000" vlink="#000000"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <form method="post" action="<?php echo $PHP_SELF; ?>" name="poll"> <table border="0" cellspacing="0" cellpadding="2" align="center" width="90%"> <tr> <td colspan="5" class="td1" height="30"><img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $$message; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="380" height="18"> </td> </tr> <tr> <td width="20%" class="td1"><?php echo $IndexQuest; ?></td> <td width="49%"> <input type="text" name="question" class="input" size="35" value="<?php echo $question; ?>"> </td> <td width="11%" class="td2"> <select name="status" class="select"> <option value="0" <?php if ($row['status'] == 0) echo "selected"; ?>><?php echo $EditOff; ?></option> <option value="1" <?php if ($row['status'] == 1) echo "selected"; ?>><?php echo $EditOn; ?></option> <option value="2" <?php if ($row['status'] == 2) echo "selected"; ?>><?php echo $EditHide; ?></option> </select> </td> <td colspan="2" class="td2"> <select name="logging" class="select"> <option value="0" <?php if ($row['logging'] == 0) echo "selected"; ?>><?php echo $EditLgOff; ?></option> <option value="1" <?php if ($row['logging'] == 1) echo "selected"; ?>><?php echo $EditLgOn; ?></option> </select> </td> </tr> <?php $i=1; while ($data = $db_connect->fetch_array($result)) { $i++; $data["option_text"] = htmlspecialchars($data["option_text"]); echo " <tr> <td width=\"20%\" class=\"td1\">$NewOption $data[option_id]</td> <td width=\"49%\"> <input type=\"text\" name=\"option_id[$data[option_id]]\" size=\"35\" class=\"input\" value=\"$data[option_text]\"> </td> <td width=\"11%\" class=\"td2\"> <input type=\"text\" name=\"votes[$data[option_id]]\" class=\"input2\" size=\"10\" value=\"$data[votes]\"> </td> <td width=\"11%\" class=\"td2\"> <select name=\"color[$data[option_id]]\" class=\"select\" onChange=\"javascript:ChangeBar(options[selectedIndex].value,$data[option_id])\"> <option value=\"blank\">---</option>\n"; for ($j=0; $j<sizeof($source_array); $j++) { if ($data["color"] == $source_array["$j"]) { echo "<option value=\"$source_array[$j]\" selected>$color_array[$j]</option>\n"; } else { echo "<option value=\"$source_array[$j]\">$color_array[$j]</option>\n"; } } echo " </select> </td> <td width=\"9%\"><img src=\"$base_gif/$data[color].gif\" name=\"bar$data[option_id]\" width=35 height=12></td> </tr>\n"; } $expiration = round (($row['exp_time']-time())/86400); if ($expiration<=0) { $expiration = 0; } ?> <tr> <td width="20%"> </td> <td colspan="4" height="35" class="td2" valign="top"><?php echo $IndexExp; ?>: <input type="text" name="exp_time" class="exp_input" size="4" value="<?php echo $expiration; ?>"> <?php echo $IndexDays; ?> <?php echo $IndexNever; ?> <input type="checkbox" name="expire" value="0" <?php if ($row['expire'] == 0) echo "checked"; ?>> <img src="<?php echo $base_gif; ?>/point2.gif" width="9" height="9"><?php echo $EditDel; ?> </tr> <tr> <td width="20%"> </td> <td colspan="4" height="35" class="td2" valign="top"> <img src="<?php echo $base_gif; ?>/h_line.gif" width="30" height="18"> <a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=extend&id=<?php echo $entry_id; ?>"><?php echo $EditAdd; ?></a> <img src="<?php echo $base_gif; ?>/h_line.gif" width="50" height="18"> <a href="javascript:ResetPoll()"><?php echo $EditReset; ?></a> <img src="<?php echo $base_gif; ?>/h_line.gif" width="30" height="18"> <?php echo $EditCom; ?> <input type="checkbox" name="comments" value="1" <?php if ($row['comments'] == 1) echo "checked"; ?>></td> </tr> <tr> <td width="20%"> </td> <td colspan="4"> <input type="submit" value="<?php echo $EditSave; ?>" class="button" onclick="return CheckDays()"> <input type="reset" value="<?php echo $FormUndo; ?>" class="button"> <input type="hidden" name="action" value="save"> <input type="hidden" name="id" value="<?php echo $entry_id; ?>"> <input type="hidden" name="log_in" value="<?php echo $log_in; ?>"> </td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_help.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; include ("./lang/$result[lang]"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} .code { font-family: "Courier New", Courier, mono; font-size: 9pt; font-weight: normal; height: 200px; width: 600px;; background-color: #C6C3C6} .code2 { font-family: "Courier New", Courier, mono; font-size: 9pt; height: 90px; width: 600px; background-color: #C6C3C6} --> </style> </head> <body bgcolor="#009999"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <form method="post" action="<?php echo $PHP_SELF; ?>" name="form"> <table border="0" cellspacing="0" cellpadding="3" align="center" width="680"> <tr> <td class="td1"><img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $Help; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="550" height="18"></td> </tr> <tr> <td class="td2">Advanced Poll <?php echo $poll_version; ?><br> Copyright ©2001<br> Author: Chi Kien Uong<br> URL: <a href="http://www.proxy2.de" target="_blank">http://www.proxy2.de</a><br> <a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=license"><?php echo $License; ?></a></td> </tr> <tr> <td><img src="<?php echo $base_gif; ?>/h_line.gif" width="600" height="18"></td> </tr> <tr> <td class="td2"><?php echo $HelpPoll; ?>:</td> </tr> <tr> <td> <textarea cols="72" rows="12" class="code" wrap="VIRTUAL"> <?php if (eregi("WIN",PHP_OS)) { $path = str_replace("\\","/",$path); } ?> <?php // this code snippet is optional require ("<?php echo $path; ?>/poll_cookie.php"); ?> <html> <body bgcolor="#ffffff"> <?php $poll_id = xx; require ("<?php echo $path; ?>/booth.php"); ?> </body> </html></textarea> </td> </tr> <tr> <td><img src="<?php echo $base_gif; ?>/h_line.gif" width="600" height="18"></td> </tr> <tr> <td class="td2"><?php echo $HelpRand; ?></td> </tr> <tr> <td> <textarea cols="72" rows="6" wrap="VIRTUAL" class="code2"><?php $random_poll = 1; require("<?php echo $path; ?>/booth.php"); ?> </textarea> <br> </td> </tr> <tr> <td><img src="<?php echo $base_gif; ?>/h_line.gif" width="600" height="18"></td> </tr> <tr> <td class="td2"><?php echo $HelpNew; ?></td> </tr> <tr> <td> <textarea cols="72" rows="6" wrap="VIRTUAL" class="code2"><?php $newest_poll = 1; require("<?php echo $path; ?>/booth.php"); ?> </textarea> <br> </td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_index.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $config_result = $db_connect->query("SELECT base_gif as base_gif, time_offset as time_offset, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $time_offset = $result["time_offset"]*3600; $base_gif = $result["base_gif"]; $db_connect->free_result($config_result); $sql_result = $db_connect->query("select count(*) as total from $sql_index"); $db_connect->fetch_array($sql_result); $total = $db_connect->record['total']; $db_connect->free_result($sql_result); include ("./lang/$result[lang]"); if(!isset($entry)) { $entry = 0; } $next_page = $entry+20; $prev_page = $entry-20; $navigation =''; if ($prev_page >= 0) { $navigation = " <img src=\"$base_gif/back.gif\" width=\"16\" height=\"14\"> <a href=\"$PHP_SELF?log_in=$log_in&entry=$prev_page\">$NavPrev</a>\n"; } if ($next_page < $total) { $navigation = $navigation. " <a href=\"$PHP_SELF?log_in=$log_in&entry=$next_page\">$NavNext</a> <img src=\"$base_gif/next.gif\" width=\"16\" height=\"14\">\n"; } $results = $db_connect->query("select * from $sql_index order by poll_id desc limit $entry, 20"); list($wday,$mday,$month,$year,$hour,$minutes) = split("( )",date("w j n Y H i",time()+$time_offset)); $newdate = "$weekday[$wday], $mday $months[$month] $year $hour:$minutes"; header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- a {text-decoration: none} .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} a:hover { color: #FF0033; text-decoration: underline} --> </style> <script language="Javascript"> <!-- function del_entry(entry) { if (window.confirm("<?php echo $Confirm; ?>")) { window.location.href = "http://"+window.location.host+window.location.pathname+"?log_in=<?php echo $log_in; ?>&action=delete&id="+entry+"&no_cache="+Math.random() } } // --> </script> </head> <body bgcolor="#009999" link="#000000" vlink="#000000"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <table border="0" cellspacing="0" cellpadding="4" align="center" width="100%"> <tr> <td colspan="6" class="td1"><img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $IndexTitle; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="420" height="18"></td> <td colspan="2" class="td2" align="right"><?php echo $newdate; ?></td> </tr> <tr> <td bgcolor="#9999CC"> </td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexQuest; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexID; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $StatCrea; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexDays; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexExp; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexStat; ?></b></td> <td class="td2" bgcolor="#9999CC"><b><?php echo $IndexAct; ?></b></td> </tr> <?php while ($row = $db_connect->fetch_array($results)) { $question = htmlspecialchars($row['question']); $date = date("j-M-Y",$row['timestamp']+$time_offset); if ($row['expire']==0) { $exp_date = "<font color=\"#0000FF\">$IndexNever</font>"; } else { $exp_date = (time()>$row['exp_time']) ? "<font color=\"#FF6600\">$IndexExpire</font>" : date("j-M-Y",$row['exp_time']+$time_offset)." (<font color=\"#FF0000\">".round(($row["exp_time"]-time())/86400)."</font>)"; } $days = (int) ((time()-$row['timestamp']+$time_offset)/86400); if ($row['status'] == 1) { $image = "$base_gif/folder.gif"; $alt = "$EditOn"; } elseif ($row['status'] == 2) { $image = "$base_gif/hidden.gif"; $alt = "$EditHide"; } else { $image = "$base_gif/lock.gif"; $alt = "$EditOff"; } $alt = htmlspecialchars($alt); $image2 = ($row['logging'] == 1) ? "$base_gif/log.gif" : "$base_gif/log_off.gif"; $image3 = ($row['comments'] == 1) ? "$base_gif/reply.gif" : "$base_gif/co_dis.gif"; echo " <tr> <td align=\"center\" bgcolor=\"#E6E6E6\"><img src=\"$image\" width=\"13\" height=\"16\" alt=\"$alt\"></td> <td class=\"td2\" bgcolor=\"#E6E6E6\"><a href=\"$PHP_SELF?log_in=$log_in&action=edit&id=$row[poll_id]\"><acronym title=\"$EditText\">$question</acronym></a></td> <td class=\"td2\" bgcolor=\"#CCCCCC\">$row[poll_id]</td> <td class=\"td2\" bgcolor=\"#E6E6E6\">$date</td> <td class=\"td2\" bgcolor=\"#CCCCCC\">$days</td> <td class=\"td2\" bgcolor=\"#E6E6E6\">$exp_date</td> <td class=\"td2\" align=\"center\" bgcolor=\"#CCCCCC\"><a href=\"$PHP_SELF?log_in=$log_in&action=stats&id=$row[poll_id]\"><img src=\"$image2\" width=\"16\" height=\"16\" border=\"0\" alt=\"$IndexStat\"></a> <a href=\"$PHP_SELF?log_in=$log_in&action=comments&id=$row[poll_id]\"><img src=\"$image3\" width=\"18\" height=\"18\" border=\"0\" alt=\"$IndexCom\"></a></td></td> <td class=\"td2\" bgcolor=\"#E6E6E6\"><a href=\"javascript:del_entry($row[poll_id])\">$IndexDel</a></td> </tr>\n"; } ?> <tr> <td align="right"><img src="<?php echo $base_gif; ?>/ip.gif" width="16" height="16"></td> <td class="td2"><?php echo $sql_username."@".$sql_hostname; ?></td> <td colspan="6" align="right" class="td2"> <?php echo $navigation; ?></td> </tr> </table> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_license.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; include ("./lang/$result[lang]"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} .license { height: 220px; width: 650px; font-family: "MS Sans Serif"; font-size: 9pt} --> </style> </head> <body bgcolor="#009999"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top" class="code2"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <form method="post" action="<?php echo $PHP_SELF; ?>" name="license"> <table border="0" cellspacing="0" cellpadding="3" align="center"> <tr> <td class="td1"><img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $License; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="500" height="18"></td> </tr> <tr class="td2"> <td class="td2"><?php echo $ScrollTxt; ?></td> </tr> <tr> <td><font face="MS sans serif" size="1"> <textarea name="textfield" cols="70" rows="16" wrap="VIRTUAL" class="license"> You should carefully read the following terms and conditions before using this software. Your use of this software indicates your acceptance of this license agreement. If you do not agree to all the terms of this agreement, do not use this software. 1. This script may be used and modified free of charge for personal, academic and non-profit use. Commercial use must register the script for a one time fee of $10 US or 10 EUR. --> http://www.proxy2.de/register Registered users receive support, free upgrades and also do not have to display the text link. 2. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice. Keep intact all the notices that refer to this License and give any other recipients of the Program a copy of this License along with the Program. 3. Selling the code for this program, or a program derived from Advanced Poll, without prior written consent is expressly forbidden. THIS SOFTWARE AND THE ACCOMPANYING FILES ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHOR DOES NOT WARRANT THAT THE FUNCTIONS CONTAINED IN THE SOFTWARE WILL MEET YOUR REQUIREMENTS, OR THAT THE OPERATION OF THE SOFTWARE WILL BE UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS DISCOVERED IN THE SOFTWARE WILL BE CORRECTED. FURTHERMORE, THE AUTHOR DOES NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OR THE RESULTS OF THE USE OF THE SOFTWARE IN TERMS OF ITS CORRECTNESS, ACCURACY, RELIABILITY, OR OTHERWISE. YOU ASSUME ALL RISKS IN USING THE SOFTWARE. NO ORAL OR WRITTEN INFORMATION OR ADVICE GIVEN BY THE AUTHOR OR ANY OF THEIR AUTHORIZED REPRESENTATIVES SHALL CREATE A WARRANTY OR IN ANY WAY INCREASE THE SCOPE OF THIS WARRANTY. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES. </textarea> </font></td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_login.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; include ("./lang/$result[lang]"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 9pt} .button { font-family: "MS Sans Serif"; font-size: 9pt; height: 22px; width: 75px} .input { font-family: "MS Sans Serif"; font-size: 9pt; height: 22px; width: 200px} --> </style> <SCRIPT LANGUAGE="JavaScript"> <!-- function set_focus() { document.pass.username.focus(); } // --> </SCRIPT> </head> <body bgcolor="#009999" onload="set_focus()"> <br> <br> <br> <br> <table border="1" cellspacing="0" cellpadding="0" align="center" width="450"> <tr bgcolor="#C6C3C6"> <td> <table width="450" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td1" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" class="td1" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/help.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"> </td> </tr> <tr align="center"> <td colspan="2"> <form method="post" name="pass" action="<?php echo $PHP_SELF; ?>"> <table border="0" cellspacing="0" cellpadding="1" width="100%"> <tr> <td rowspan="3" valign="top" align="right" width="12%"><img src="<?php echo $base_gif; ?>/key.gif" width="35" height="40"> </td> <td colspan="2" class="td1" height="42"><?php echo $$message; ?></td> </tr> <tr> <td class="td1" width="18%"><?php echo $PwdUser; ?></td> <td width="70%"> <input type="text" name="username" size="25" class="input"> </td> </tr> <tr> <td class="td1" height="35" width="18%"><?php echo $PwdPass; ?></td> <td height="35" width="70%"> <input type="password" name="password" size="25" class="input"> <input type="hidden" name="enter" value="1"> </td> </tr> </table> <table width="100%" border="0" cellspacing="0" cellpadding="1"> <tr> <td align="right" width="47%"> <input type="submit" value=" <?php echo $FormOK; ?> " class="button"> </td> <td align="right" width="1%"> </td> <td width="52%"> <input type="reset" value="<?php echo $FromClear; ?>" class="button"> </td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> <br> <br> <br> </body> </html> --- NEW FILE: admin_new.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; include ("./lang/$result[lang]"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} .input { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; width: 350px} .exp_input { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; width: 30px} .button { font-family: Arial, Helvetica, sans-serif; font-size: 9pt} .select { font-family: Arial, Helvetica, sans-serif; font-size: 9pt} --> </style> <script language="JavaScript"> <!-- blank = new Image(); blank.src = "<?php echo $base_gif; ?>/blank.gif"; <?php $source_array = array( "aqua","blue","brown","darkgreen","gold","green","grey","orange","pink","purple","red","yellow" ); for ($i=0;$i<sizeof($source_array); $i++) { echo "$source_array[$i] = new Image(); $source_array[$i].src = \"$base_gif/$source_array[$i].gif\";\n"; } ?> function ChangeBar(sel,img) { eval("document.bar"+img+".src="+sel+".src"); } function trim(value) { startpos=0; while((value.charAt(startpos)==" ")&&(startpos<value.length)) { startpos++; } if(startpos==value.length) { value=""; } else { value=value.substring(startpos,value.length); endpos=(value.length)-1; while(value.charAt(endpos)==" ") { endpos--; } value=value.substring(0,endpos+1); } return(value); } function CheckForm() { document.form.question.value = trim(document.form.question.value); document.form.exp_time.value = trim(document.form.exp_time.value); document.forms[0].elements[2].value = trim(document.forms[0].elements[2].value); if (document.form.question.value == "") { alert('<?php echo $NewNoQue; ?>!'); document.form.question.focus(); return false; } if (document.forms[0].elements[2].value == "") { alert('<?php echo $NewNoOpt; ?>!'); document.forms[0].elements[2].focus(); return false; } if (document.form.expire.checked == false) { if(!(document.form.exp_time.value >= 0) || document.form.exp_time.value == "") { alert("<?php echo $SetEmpty; ?>"); document.form.exp_time.focus(); return false; } } } // --> </script> </head> <body bgcolor="#009999"> <table border="1" cellspacing="0" cellpadding="0" align="center" width="750"> <tr bgcolor="#C6C3C6" valign="top"> <td> <table width="750" border="0" cellspacing="0" cellpadding="1" align="center"> <tr bgcolor="#400080"> <td height="20" class="td2" bgcolor="#000084"><b><font color="#FFFFFF"> Advanced Poll <?php echo $poll_version; ?></font></b></td> <td height="20" align="right" bgcolor="#000084"><img src="<?php echo $base_gif; ?>/min.gif" width="16" height="14"><img src="<?php echo $base_gif; ?>/max.gif" width="16" height="14"> <img src="<?php echo $base_gif; ?>/cross.gif" width="16" height="14"></td> </tr> <tr valign="top"> <td colspan="2"> <table border="0" cellspacing="0" cellpadding="1"> <tr> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> <tr> <td align="center" rowspan="2" width="7"><img src="<?php echo $base_gif; ?>/v_line.gif" width="5" height="50"></td> <td align="center" width="112"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=show"><img src="<?php echo $base_gif; ?>/index.gif" width="32" height="32" border="0" alt="<?php echo $IndexTitle; ?>"></a></td> <td align="center" width="122"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=new"><img src="<?php echo $base_gif; ?>/new.gif" width="32" height="32" border="0" alt="<?php echo $NewTitle; ?>"></a></td> <td align="center" width="156"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=general"><img src="<?php echo $base_gif; ?>/settings.gif" width="32" height="32" border="0" alt="<?php echo $SetTitle; ?>"></a></td> <td align="center" width="124"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=settings&panel=password"><img src="<?php echo $base_gif; ?>/password.gif" width="32" height="32" border="0" alt="<?php echo $PwdTitle; ?>"></a></td> <td align="center" width="91"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=help"><img src="<?php echo $base_gif; ?>/howto.gif" width="32" height="32" border="0" alt="<?php echo $Help; ?>"></a></td> <td align="center" width="129"><a href="<?php echo "$PHP_SELF"."?log_in=$log_in&"; ?>action=logout"><img src="<?php echo $base_gif; ?>/logout.gif" width="32" height="32" border="0" alt="<?php echo $Logout; ?>"></a></td> </tr> <tr align="center" valign="top"> <td width="112" class="td2"><?php echo $IndexTitle; ?></td> <td width="122" class="td2"><?php echo $NewTitle; ?></td> <td width="156" class="td2"><?php echo $SetTitle; ?></td> <td width="124" class="td2"><?php echo $PwdTitle; ?></td> <td width="91" class="td2"><?php echo $Help; ?></td> <td width="129" class="td2"><?php echo $Logout; ?></td> </tr> <tr align="left"> <td colspan="7"><img src="<?php echo $base_gif; ?>/top_line.gif" width="745" height="3"></td> </tr> </table> <form method="post" action="<?php echo $PHP_SELF; ?>" name="form"> <table width="90%" border="0" cellspacing="0" cellpadding="2" align="center"> <tr> <td colspan="4" class="td1" height="30"><img src="<?php echo $base_gif; ?>/h_line.gif" width="15" height="18"> <?php echo $$message; ?> <img src="<?php echo $base_gif; ?>/h_line.gif" width="420" height="18"> </td> </tr> <tr> <td width="25%" class="td1"><?php echo $IndexQuest; ?></td> <td width="40%"> <input type="text" class="input" name="question" size="38" maxlength="100"> </td> <td colspan="2" width="35%" class="select"> <select name="logging" class="select"> <option value="0" selected><?php echo $EditLgOff; ?></option> <option value="1"><?php echo $EditLgOn; ?></option> </select> </td> </tr> <?php for ($i=1; $i < 11; $i++) { echo " <tr> <td width=\"25%\" class=\"td1\">$NewOption $i</td> <td width=\"40%\"> <input type=\"text\" name=\"option_id[$i]\" size=\"38\" class=\"input\" maxlength=\"100\"> </td> <td class=\"td2\" width=\"10%\"> <select class=\"select\" name=\"color[$i]\" onChange=\"javascript:ChangeBar(options[selectedIndex].value,$i)\"> <option value=\"blank\">---</option>\n"; for ($j=0; $j <sizeof($source_array); $j++) { echo "<option value=\"$source_array[$j]\">$color_array[$j]</option>\n"; } echo " </select></td> <td width=\"25%\" align=\"left\"><img src=\"$base_gif/blank.gif\" name=\"bar$i\" width=\"35\" height=\"12\"></td> </tr>\n"; } ?> <tr> <td width="25%"> </td> <td colspan="3" height="35" class="td2"> <?php echo $EditStat; ?>: <select name="status" class="select"> <option value="0"><?php echo $EditOff; ?></option> <option value="1" selected><?php echo $EditOn; ?></option> <option value="2"><?php echo $EditHide; ?></option> </select> <?php echo $IndexExp; ?>: <input type="text" name="exp_time" class="exp_input" size="4"> <?php echo $IndexDays; ?> <?php echo $IndexNever; ?> <input type="checkbox" name="expire" value="0" checked> <?php echo $EditCom; ?><input type="checkbox" name="comments" value="1"> </td> </tr> <tr> <td width="25%"> </td> <td colspan="3" height="35"> <input class="button" type="submit" value="<?php echo $NewTitle; ?>" onclick="return CheckForm()"> <input class="button" type="reset" value="<?php echo $FormUndo; ?>"> <input type="hidden" name="action" value="create"> <input type="hidden" name="log_in" value="<?php echo $log_in; ?>"> </td> </tr> </table> </form> </td> </tr> </table> </td> </tr> </table> <br> <br> </body> </html> --- NEW FILE: admin_options.php --- <?php /////////////////////////////////////////////////// // Advanced Poll 1.6 (PHP/MySQL) // // Copyright (c)2001 Chi Kien Uong // // URL: http://www.proxy2.de // /////////////////////////////////////////////////// $poll_result = $db_connect->query("SELECT question as question FROM $sql_index WHERE (poll_id = '$poll_id')"); $row = $db_connect->fetch_array($poll_result); $question = htmlspecialchars($row['question']); $db_connect->free_result($poll_result); $result = $db_connect->query("select max(option_id) as option_id from $sql_data where (poll_id = '$poll_id')"); $data = $db_connect->fetch_array($result); $db_connect->free_result($result); $config_result = $db_connect->query("SELECT base_gif as base_gif, lang as lang FROM $sql_config WHERE (config_id = '1')"); $result = $db_connect->fetch_array($config_result); $base_gif = $result["base_gif"]; include ("./lang/$result[lang]"); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); ?> <html> <head> <title>Advanced Poll <?php echo $poll_version; ?></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <style type="text/css"> <!-- .td1 { font-family: "MS Sans Serif"; font-size: 10pt} .td2 { font-family: "MS Sans Serif"; font-size: 9pt} .input { font-family: "MS Sans Serif"; font-size: 9pt; height: 20px; wid... [truncated message content] |