103 |
- |
1 |
<?php
|
|
|
2 |
|
|
|
3 |
/***************************************************************************
|
|
|
4 |
* Copyright (C) 2009-2011 by Geo Varghese(www.seofreetools.net) *
|
|
|
5 |
* sendtogeo@gmail.com *
|
|
|
6 |
* *
|
|
|
7 |
* This program is free software; you can redistribute it and/or modify *
|
|
|
8 |
* it under the terms of the GNU General Public License as published by *
|
|
|
9 |
* the Free Software Foundation; either version 2 of the License, or *
|
|
|
10 |
* (at your option) any later version. *
|
|
|
11 |
* *
|
|
|
12 |
* This program is distributed in the hope that it will be useful, *
|
|
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
15 |
* GNU General Public License for more details. *
|
|
|
16 |
* *
|
|
|
17 |
* You should have received a copy of the GNU General Public License *
|
|
|
18 |
* along with this program; if not, write to the *
|
|
|
19 |
* Free Software Foundation, Inc., *
|
|
|
20 |
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
|
|
|
21 |
***************************************************************************/
|
|
|
22 |
|
|
|
23 |
include_once("includes/sp-load.php");
|
|
|
24 |
if(empty($_SERVER['REQUEST_METHOD'])){
|
|
|
25 |
|
|
|
26 |
# the section for generate reports using system cron job
|
|
|
27 |
include_once(SP_CTRLPATH."/cron.ctrl.php");
|
|
|
28 |
$controller = New CronController();
|
|
|
29 |
|
|
|
30 |
include_once(SP_CTRLPATH."/directory.ctrl.php");
|
|
|
31 |
$dirCtrler = New DirectoryController();
|
|
|
32 |
|
|
|
33 |
$searchInfo = array(
|
|
|
34 |
//'working' => 1, # to check active directories
|
|
|
35 |
//'working' => 0, # to check inactive directories
|
|
|
36 |
'checked' => 0, # to check unchecked directories
|
|
|
37 |
);
|
|
|
38 |
$dirList = $dirCtrler->getAllDirectories($searchInfo);
|
|
|
39 |
|
|
|
40 |
$dirCtrler->checkPR = 1; // check pagerank of directory or not
|
|
|
41 |
foreach($dirList as $dirInfo){
|
|
|
42 |
$dirCtrler->checkDirectoryStatus($dirInfo['id']);
|
|
|
43 |
echo "sleep for ".SP_CRAWL_DELAY. " seconds";
|
|
|
44 |
sleep(SP_CRAWL_DELAY);
|
|
|
45 |
}
|
|
|
46 |
}else{
|
|
|
47 |
showErrorMsg("<p style='color:red'>You don't have permission to access this page!</p>");
|
|
|
48 |
}
|
|
|
49 |
?>
|