31 lines
927 B
PHP
31 lines
927 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
/* $Id: video_conversion_cronjob.php 13 2009-01-11 06:04:29Z john $ */
|
||
|
|
|
||
|
|
$page = 'video_conversion_cronjob';
|
||
|
|
include "header.php";
|
||
|
|
|
||
|
|
|
||
|
|
// Use this file to trigger the job queue handler via cronjob.
|
||
|
|
// Set a password to prevent calls, then use the following example URL to set your cronjob path:
|
||
|
|
// EX: video_conversion_cronjob.php?password=l53SDj6SGF2nb4
|
||
|
|
$password = 'leptestpassword123';
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
if( $_GET['password']==$password )
|
||
|
|
{
|
||
|
|
|
||
|
|
$query=$database->database_query("SELECT * FROM se_grouptopics");
|
||
|
|
while($row=$database->database_fetch_array($query))
|
||
|
|
{
|
||
|
|
$count=$database->database_result($database->database_query("SELECT COUNT(*) FROM se_groupposts WHERE grouppost_grouptopic_id='".$row["grouptopic_id"]."'"),0);
|
||
|
|
$database->database_query("UPDATE se_grouptopics SET grouptopic_totalposts='$count' WHERE grouptopic_id='".$row["grouptopic_id"]."'");
|
||
|
|
}
|
||
|
|
}
|
||
|
|
else{echo "wrong";}
|
||
|
|
|
||
|
|
|
||
|
|
exit();
|
||
|
|
|
||
|
|
?>
|