} $edit_array[$key]['value'] = $value; } if (is_array($update_array)) { $newsite = sp_clean($_POST['addsite'], 'esc'); $sql_update = ""; foreach ($update_array as $key => $data) { $sql_update .= ($sql_update ? ", " : "") . "{$key}='{$data}'"; } $sql = "update " . TBL_SITES . " set {$sql_update} where " . FLD_SITE_ID . "='{$FLD_SITE_ID}'"; $rs = $DB->Execute($sql); } } } if ($_POST['addsite'] && sp_validate($_POST['addsite'], 'url')) { $newsite = sp_clean($_POST['addsite'], 'esc'); $sql = "Insert into " . TBL_SITES . " set " . FLD_SITE_NAME . "='{$newsite}'"; $rs = $DB->Execute($sql); } print $DB->ErrorMsg(); ?> <table width="640" border="1"> <tr> <th scope="col" colspan="5">Manage Websites </th> </tr> <tr align="center"><td width="20%"> <form name="wordlist" action="" method="post"> <input type="submit" name='addsite' value="Add Website" onclick="this.value=prompt('Please Enter the New Website:','http://');" > <select name='<?php echo FLD_SITE_ID;
$rs->MoveNext(); } } else { if ($siteID) { $sql = "SELECT *\n\t\tFROM " . TBL_SITES . " as si \n\t\twhere " . FLD_SITE_ID . " = {$siteID}"; $siteInfo = $DB->GetRow($sql); $reportInfo = unserialize($siteInfo[FLD_SITE_REPORT]); $order = "DESC"; if ($_GET['order'] == 'ASC') { $order = "ASC"; } $fliporder = "ASC"; if ($order == 'ASC') { $fliporder = "DESC"; } $orderby = sp_clean($_GET['orderby'], 'sqlfield'); if (!$orderby) { $orderby = FLD_LINKS_SCORE_DISALLOWED; } ?> <table width="640" border="1"> <tr> <th scope="col" colspan="2">Website Overview</th> </tr> <tr style='font-weight:bold' align="center"> <td>Website:</td> <td align="left"><?php echo nl2br($siteInfo[FLD_SITE_NAME]); ?> </td>
$newcat = ucfirst(sp_clean($_POST['addcat'], 'word')); $sql = "Insert into " . TBL_WORD_CATEGORY . " set " . FLD_WORD_CATEGORY_CATEGORY . "='{$newcat}'"; if ($newcat) { $rs = $DB->Execute($sql); } } if ($_POST['remcat']) { $sql = "Delete from " . TBL_WORD_CATEGORY . " where " . FLD_WORD_CATEGORY_ID . "='{$FLD_WORD_CATEGORY_ID}'"; $rs = $DB->Execute($sql); $sql = "Delete from " . TBL_WL_WC . " where " . FLD_WORD_CATEGORY_ID . "='{$FLD_WORD_CATEGORY_ID}'"; $rs = $DB->Execute($sql); } if ($_POST['addword']) { $addword = explode("||", $_POST['addword'], 'word'); if ($addword[0] && $addword[1] && $addword[2]) { $sql = "Insert into " . TBL_WORD_LIST . " set " . FLD_WORD_WORD . "='" . sp_clean($addword[0], 'esc') . "'," . FLD_WORD_WEIGHT . "='" . round($addword[1], 2) . "'," . FLD_WORD_TYPE . "='" . ($addword[2] == 'true' ? "disallowed" : "required") . "'"; $rs = $DB->Execute($sql); } } if ($_POST['remword']) { foreach ($_REQUEST[FLD_WORD_ID] as $wordId) { $sql = "Delete from " . TBL_WORD_LIST . " where " . FLD_WORD_ID . "='" . intval($wordId) . "'"; $rs = $DB->Execute($sql); $sql = "Delete from " . TBL_WL_WC . " where " . FLD_WORD_ID . "='" . intval($wordId) . "'"; $rs = $DB->Execute($sql); } } if ($_POST['addtocat'] && $FLD_WORD_CATEGORY_ID) { foreach ($_REQUEST[FLD_WORD_ID] as $wordId) { $sql = "Insert into " . TBL_WL_WC . " set " . FLD_WORD_ID . "='" . intval($wordId) . "', " . FLD_WORD_CATEGORY_ID . "='{$FLD_WORD_CATEGORY_ID}'"; $rs = $DB->Execute($sql);