Example #1
0
 } else {
     //      Text for e-mail to dispatcher when suggestion was approved without authentification
     $text2 = "On {$created} you suggested the site {$url} to be indexed by our search engine.\n\n    Your suggestion was accepted by the system administrator and will be indexed shortly.\n\n    We appreciate your help and effort in building this search engine.\n\n\n    This mail was automatically generated by {$mailer}.\n";
 }
 //      Text for e-mail to dispatcher when suggestion was rejected
 $text3 = "On {$created} you suggested the site {$url} to be indexed by our search engine.\n\n    Your suggestion was rejected by the system administrator and will not be indexed.\n\n    We appreciate your help and effort in building this search engine.\n\n\n    This mail was automatically generated by {$mailer}.\n";
 //      Text for e-mail to dispatcher when suggestion was rejected and banned
 $text4 = "On {$created} you suggested the site {$url} to be indexed by our search engine.\n\n    Your suggestion was rejected and banned by the system administrator and will never be indexed.\n\n\n    This mail was automatically generated by {$mailer}.\n";
 if ($approve == "Approve") {
     $compurl = parse_url($url);
     if ($compurl['path'] == '') {
         $url = $url . "/";
     }
     $prior_level = 1;
     //  define another prior level in 'Edit' option for this URL
     addsite($url, $title, $short_desc, $cat, '', '', $authent, $prior_level);
     $sql_query = "SELECT site_ID from " . $mysql_table_prefix . "sites where url='{$url}'";
     $result = $db_con->query($sql_query);
     if ($debug && $db_con->errno) {
         $err_row = __LINE__ - 2;
         printf("<p><span class='red'>&nbsp;MySQL failure: %s&nbsp;\n<br /></span></p>", $db_con->error);
         if (__FUNCTION__) {
             printf("<p><span class='red'>&nbsp;Found in script: " . __FILE__ . "&nbsp;&nbsp;row: {$err_row}&nbsp;&nbsp;in function():&nbsp;" . __FUNCTION__ . "&nbsp;<br /></span></p>");
         } else {
             printf("<p><span class='red'>&nbsp;Found in script: " . __FILE__ . "&nbsp;&nbsp;row: {$err_row}&nbsp;<br /></span></p>");
         }
         printf("<p><span class='red'>&nbsp;Script execution aborted.&nbsp;<br /></span>");
         printf("<p><strong>Invalid query string, which caused the SQL error:</strong></p>");
         echo "<p> {$sql_query} </p>";
         exit;
     }
Example #2
0
                    $class = "white";
                }
                print "<tr class=\"{$class}\"><td align=\"left\"><a href='{$log_dir}/{$file}' tareget='_blank'>{$file}</a></td><td align=\"center\"> 20{$year}-{$month}-{$day} {$hour}:{$minute}</td><td align=\"center\"> <a href='?f=delete_log&file={$file}' id='small_button'>Delete</a></td></tr>";
            }
            print "</table></td></tr></table></div>";
        } else {
            ?>
					<br/><br/>
					<center><b>No saved logs.</b></center>
					<?php 
        }
    }
}
switch ($f) {
    case 1:
        $message = addsite($url, $title, $short_desc, $cat);
        $compurl = parse_url($url);
        if ($compurl['path'] == '') {
            $url = $url . "/";
        }
        $result = mysql_query("select site_id from " . $mysql_table_prefix . "sites where url='{$url}'");
        echo mysql_error();
        $row = mysql_fetch_row($result);
        if ($site_id != "") {
            siteScreen($site_id, $message);
        } else {
            showsites($message);
        }
        break;
    case 2:
        showsites();