Example #1
0
<?php

include "includes/header.php";
?>

<?php 
include "includes/handle_results.php";
$jobs = getJobs($dbhandle);
?>
	
      <div class="starter-template left">
        
        <p class="lead">Job Results</p>
		<form action="" method="post">
		<?php 
if ($msg != '') {
    ?>
		<p class="alert alert-danger"><?php 
    echo $msg;
    ?>
</p>
		<?php 
}
?>
		
		<?php 
if (count($jobs) > 0) {
    ?>
		<table class="table table-striped">
            <thead>
              <tr>
Example #2
0
                     if (is_numeric($_REQUEST["job_id"])) {
                         deleteJob($_REQUEST["job_id"]);
                         header("Location: " . $GLOBALS['contextpath'] . "/user/" . $_SESSION['username'] . "/");
                     }
                     exit;
                     break;
                 case "reset":
                     if (is_numeric($_REQUEST["job_id"])) {
                         resetJob($_REQUEST["job_id"]);
                         header("Location: " . $GLOBALS['contextpath'] . "/job/" . $_REQUEST["job_id"] . "/");
                     }
                 case "viewall":
                     header("Location: " . $GLOBALS['contextpath'] . "/user/" . $_SESSION['username'] . "/");
                     break;
                 default:
                     getJobs();
                     exit;
                     break;
             }
             exit;
             break;
         case "useragents":
             getUserAgents();
             exit;
             break;
         case "settings":
             getSettings();
             exit;
             break;
     }
 }
Example #3
0
<?
require('db.php');
require('utils.php');
require('header.php');
?>
<? 

$action=$_GET['action'];

if ($action == 'remove')
{
   print("Removing Jobs.<br>");
   killJobs($_GET['id']); 
}
if ($action == 'removeone')
{
	print("Removing single job.<br>");
	killOneJob($_GET['jobid']);
        getJobs($_GET['id']); 
}
?>
<a href="/">Home</a><br>
<? require('footer.php'); ?>
</body>
</html>


<?php

ini_set('max_execution_time', 0);
error_reporting(0);
require_once '../db.php';
if ($_POST['action'] == 'scrape') {
    $sql = "TRUNCATE temp_url_level3 ";
    $result = mysql_query($sql);
    $url = trim($_POST['url']);
    crawl_page($url, 2);
    $cnt = countURlsToCrawl();
    echo '<b>URLs to crawl : </b>' . $cnt['cnt'];
    exit;
} else {
    if ($_POST['action'] == 'proceed') {
        $output = getJobs();
        //$time_start = microtime(true);
        require_once 'html/output.php';
        exit;
        //$time_end = microtime(true);
        //$time = $time_end - $time_start;
        //echo $time . ' secs';
    } else {
        require_once 'html/home.php';
    }
}
function countURlsToCrawl()
{
    $sql = "SELECT count(1) as cnt from temp_url_level3 order by id asc";
    $result = mysql_query($sql);
    return mysql_fetch_assoc($result);
Example #5
0
<?
require('db.php');
require('utils.php');
require('header.php');
$theid = $_POST['id'];
if ($theid == "")
{
	$theid = $_GET['id']; 
}
?>
<html>
<head>
<title>Android @ MSI Wireless Jobs</title>
</head>
<body>
<h3>Job List for <? print('['.$theid.']'); ?>.</h3>
<hr />
<? getJobs($theid);?>
<br>
<a href="/">Home</a><br>
<? require('footer.php'); ?>
</body>
</html>