function editsiteform($site_id) { global $mysql_table_prefix; $result = mysql_query("SELECT site_id, url, title, short_desc, spider_depth, required, disallowed, can_leave_domain from " . $mysql_table_prefix . "sites where site_id={$site_id}"); echo mysql_error(); $row = mysql_fetch_array($result); $depth = $row['spider_depth']; $fullchecked = ""; $depthchecked = ""; if ($depth == -1) { $fullchecked = "checked"; $depth = ""; } else { $depthchecked = "checked"; } $leave_domain = $row['can_leave_domain']; if ($leave_domain == 1) { $domainchecked = "checked"; } else { $domainchecked = ""; } ?> <div id="submenu"><center><b>Edit site</b></center> </div> <br/><div align=center><center><table> <form action=admin.php method=post> <input type=hidden name=f value=4> <input type=hidden name=site_id value=<?php print $site_id; ?> > <tr><td><b>URL:</b></td><td align ="right"></td><td><input type=text name=url value=<?php print "\"" . $row['url'] . "\""; ?> size=60></td></tr> <tr><td><b>Title:</b></td><td></td><td> <input type=text name=title value=<?php print "\"" . stripslashes($row['title']) . "\""; ?> size=60></td></tr> <tr><td><b>Short description:</b></td><td></td><td><textarea name=short_desc cols=45 rows=3 wrap><?php print stripslashes($row['short_desc']); ?> </textarea></td></tr> <tr><td><b>Spidering options:</b></td><td></td><td><input type="radio" name="soption" value="full" <?php print $fullchecked; ?> > Full<br/> <input type="radio" name="soption" value="level" <?php print $depthchecked; ?> >To depth: <input type="text" name="depth" size="2" value="<?php print $depth; ?> "><br/> <input type="checkbox" name="domaincb" value="1" <?php print $domainchecked; ?> > Spider can leave domain </td></tr> <tr><td><b>URLs must include:</b></td><td></td><td><textarea name=in cols=45 rows=2 wrap="virtual"><?php print $row['required']; ?> </textarea></td></tr> <tr><td><b>URLs must not include:</b></td><td></td><td><textarea name=out cols=45 rows=2 wrap="virtual"><?php print $row['disallowed']; ?> </textarea></td></tr> <tr><td>Category:</td><td></td><td> <?php walk_through_cats(0, 0, $site_id); ?> </td></tr> <tr><td></td><td></td><td><input type="submit" id="submit" value="Update"></td></tr></form></table></center></div> <?php }
function editsiteform($site_id) { global $db_con, $mysql_table_prefix, $debug, $add_auth; $sql_query = "SELECT * from " . $mysql_table_prefix . "sites where site_id={$site_id}"; $result = $db_con->query($sql_query); if ($debug && $db_con->errno) { $err_row = __LINE__ - 2; printf("<p><span class='red'> MySQL failure: %s \n<br /></span></p>", $db_con->error); if (__FUNCTION__) { printf("<p><span class='red'> Found in script: " . __FILE__ . " row: {$err_row} in function(): " . __FUNCTION__ . " <br /></span></p>"); } else { printf("<p><span class='red'> Found in script: " . __FILE__ . " row: {$err_row} <br /></span></p>"); } printf("<p><span class='red'> Script execution aborted. <br /></span>"); printf("<p><strong>Invalid query string, which caused the SQL error:</strong></p>"); echo "<p> {$sql_query} </p>"; exit; } $row = $result->fetch_array(MYSQLI_ASSOC); $url = $db_con->real_escape_string($row['url']); $depth = $row['spider_depth']; $fullchecked = ""; $depthchecked = ""; if ($depth == -1) { $fullchecked = 'checked="checked"'; $depth = ""; } else { $depthchecked = 'checked="checked"'; } $domainlv = $row['can_leave_domain']; if ($domainlv == 1) { $domainlv = 'checked="checked"'; } else { $domainlv = ""; } $use_pref = $row['use_prefcharset']; if ($use_pref == 1) { $use_pref = 'checked="checked"'; } else { $use_pref = ""; } $prior_level = $row['prior_level']; // already sitemap url in database? if (!preg_match("/http:\\/\\//", $row['smap_url'])) { $row['smap_url'] = 'If sitemap is not in root folder, enter URL here'; } ?> <div class='submenu em cntr'>| Edit site |</div> <div class='panel w75'> <form class='txt' action='admin.php' method='post'> <input type='hidden' name='f' value='4' /> <input type='hidden' name='site_id' value="<?php echo $site_id; ?> " /> <fieldset> <legend>[ Edit Site Details ]</legend> <label class='em' for='url'>URL:</label> <input type='text' name='url' id='url' title='Enter URL' value="<?php echo $url; ?> " size='68' maxlength='1024' /> <label class='em' for='title'>Title:</label> <input type='text' name='title' id='title' title='Enter Web Site title' value="<?php echo $row['title']; ?> " size='60' maxlength='255' /> <label class='em' for='short_desc'>Short description:</label> <input type='text' name='short_desc' id='short_desc' title='Enter short site description' size='68' maxlength='255' value="<?php echo $row['short_desc']; ?> " /> <label class='em' for='smap_url'>URL of sitemap:</label> <input type='text' name='smap_url' id='smap_url' title='Enter URL of sitemap if not in root folder' value="<?php echo $row['smap_url']; ?> " size='68' maxlength='1024'/> <br /><br /> <?php if ($add_auth == '1') { echo "\n <label class='em' for='authent'>Enter tag value for authentification (leave blank for authentification free sites)</label>\n <input type='text' name='authent' id='authent' title='Enter the header tag value here' size='68' maxlength='255' value='" . stripslashes($row['authent']) . "'\n />\n <br /><br />\n "; } echo "\n </fieldset>\n <fieldset><legend>[ Basic Indexing Options ]</legend>\n <label class='em' for='soption'>Spidering options:</label>\n <input type='radio' name='soption' id='soption' value='full' {$fullchecked}\n /> Full<br />\n <input type='radio' name='soption' value='level' {$depthchecked}\n /> Index Depth:\n <input type='text' name='depth' size='2' value='{$depth}'\n />\n <label class='em' for='domainlv'>Spider can leave domain?</label>\n <input type='checkbox' name='domainlv' id='domainlv' value='1' title='Check box if Sphider can leave above domain' {$domainlv}\n /> Check for Yes\n <label class='em' for='use_pref'>Use preferred charset for indexing?</label>\n <input type='checkbox' name='use_pref' id='use_pref' value='1' title='Check box if Sphider should use the preferred charset as defined in \"Settings\"' {$use_pref}\n /> Check for Yes\n <label class='em' for='prior_level'>Define preference level for 'Re-index only priorizited sites':</label>\n 1 = highest preference, 5 = lowest preference: <select name='prior_level' id='prior_level' title='Select level for Re-index priorizited sites'>\n\n <option value='1'"; if ($prior_level == '1') { echo "checked='checked'"; } echo ">1</option>\n <option value='2'"; if ($prior_level == '2') { echo " selected='selected'"; } echo ">2</option>\n <option value='3'"; if ($prior_level == '3') { echo " selected='selected'"; } echo ">3</option>\n <option value='4'"; if ($prior_level == '4') { echo " selected='selected'"; } echo ">4</option>\n <option value='5'"; if ($prior_level == '5') { echo " selected='selected'"; } echo ">5</option></select>\n <p> </p>\n\n\n </fieldset>\n <fieldset><legend>[ Include/Exclude Options ]</legend>\n <label class='em' for='in'>URL Must include:</label>\n <textarea name='in' id='in' cols='45' rows='5' title='Enter URLs that Must be included, one per line'>" . $row['required'] . "</textarea>\n <p> </p>\n <label class='em' for='out'>URL must Not include:</label>\n <textarea name='out' cols='45' rows='5' title='Enter URLs that Must Not be included, one per line'>" . $row['disallowed'] . "</textarea>\n <p> </p>\n "; walk_through_cats(0, 0, $site_id); echo "</fieldset>\n <fieldset><legend>[ Confirm Changes ]</legend>\n <p> <input type='submit' id='submit' value='Update' title='Click to confirm Site Edit update'/></p>\n\n </fieldset>\n </form>\n <a class='bkbtn' href='admin.php?f=20&site_id=" . $row['site_id'] . "' title='Go back a Page'>Back</a>\n </div>\n "; }
function editsiteform($site_id) { $result = mysql_query("SELECT site_id, url, title, short_desc, spider_depth, required, disallowed, can_leave_domain from " . TABLE_PREFIX . "sites where site_id={$site_id}"); if (DEBUG > '0') { echo mysql_error(); } $row = mysql_fetch_array($result); $depth = $row['spider_depth']; $fullchecked = ""; $depthchecked = ""; if ($depth == -1) { $fullchecked = 'checked="checked"'; $depth = ""; } else { $depthchecked = 'checked="checked"'; } $leave_domain = $row['can_leave_domain']; if ($leave_domain == 1) { $domainchecked = 'checked="checked"'; } else { $domainchecked = ""; } echo "<div class='submenu em'>\r\n\t\t\t<ul>\r\n\t\t\t\t<li><a href='" . WEBROOT_DIR . "/admin/?f=20&site_id=" . $row['site_id'] . "' title='Go back a Page'>Back</a></li>\r\n\t\t\t</ul>\r\n\t\t</div>\r\n\t\t\t\t<div class='panel w75'>\r\n\t\t\t\t<form class='txt' action='index.php' method='post'>\r\n\t\t\t\t\t<input type='hidden' name='f' value='4' />\r\n\t\t\t\t\t<input type='hidden' name='site_id' value='{$site_id}' />\r\n\t\t\t\t\t<fieldset class='mains'>\r\n\t\t\t\t\t\t<legend>Edit Site Details</legend>\r\n\t\t\t\t\t\t<label class='em' for='url'>URL:</label>\r\n\t\t\t\t\t\t<input type='text' name='url' id='url' title='Enter URL' value='" . $row['url'] . "' />\r\n\t\t\t\t\t\t<label class='em' for='title'>Title:</label>\r\n\t\t\t\t\t\t<input type='text' name='title' id='title' title='Enter Web Site title' value='" . stripslashes($row['title']) . "' />\r\n\t\t\t\t\t\t<label class='em' for='short_desc'>Short description:</label>\r\n\t\t\t\t\t\t<input type='text' name='short_desc' id='short_desc' title='Enter short site description' maxlength='68' value='" . stripslashes($row['short_desc']) . "' />\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t<fieldset class='radiobuttons'>\r\n\t\t\t\t\t\t<legend>Spidering options:</legend>\r\n\t\t\t\t\t\t<input type='radio' name='soption' id='soption' value='full' {$fullchecked} /> <label for='soption'>Full</label><br />\r\n\t\t\t\t\t\t<input type='radio' name='soption' id='soptionlevel' value='level' {$depthchecked} /> <label for='soptionlevel'>Index Depth:</label> <input type='text' name='depth' size='2' value='{$depth}' />\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t<fieldset class='checkbox'>\r\n\t\t\t\t\t\t<legend>Spider can leave domain?</legend>\r\n\t\t\t\t\t\t<input type='checkbox' name='domaincb' id='domaincb' value='1' title='Check box if Sphider can leave above domain' {$domainchecked} /> <label for='domaincb'>Check for Yes</label>\r\n\t\t\t\t\t</fieldset>\r\n\t\t\t\t\t<fieldset class='mains'>\r\n\t\t\t\t\t\t<legend>Include/Exclude Options</legend>\r\n\t\t\t\t\t\t<label class='em' for='in'>URL Must include:</label>\r\n\t\t\t\t\t\t<textarea name='in' id='in' cols='45' rows='5' title='Enter URLs that Must be included, one per line'>" . $row['required'] . "</textarea>\r\n\t\t\t\t\t\t<label class='em' for='out'>URL must Not include:</label>\r\n\t\t\t\t\t\t<textarea name='out' cols='45' rows='5' title='Enter URLs that Must Not be included, one per line'>" . $row['disallowed'] . "</textarea>\r\n\t\t"; walk_through_cats(0, 0, $site_id); echo "</fieldset>\r\n\t\t\t\t<fieldset>\r\n\t\t\t\t\t<input type='submit' id='submit' value='Update' title='Click to confirm Site Edit update' />\r\n\t\t\t\t</fieldset>\r\n\t\t\t</form>\r\n\t\t</div>\r\n\t\t"; }