Example #1
0
		<td width="10%" align="right" valign="middle" nowrap>
		<table>
			<tr>
				<td><a
					href="<?php 
$next = next_day($curday, $curmonth, $curyear);
print "day_view.php?day=" . $next[day] . "&month=" . $next[month] . "&year=" . $next[year];
?>
"
					class="calendar-link-nav"><?php 
echo CALENDAR_NEXT_DAY;
?>
</a></td>
				<td><a
					href="<?php 
$next = next_day($curday, $curmonth, $curyear);
print "day_view.php?day=" . $next[day] . "&month=" . $next[month] . "&year=" . $next[year];
?>
"
					class="calendar-link-nav"><span
					class="ui-icon ui-icon-circle-triangle-e" style=""></span></a></td>
			</tr>
		</table>
		</td>
	</tr>
</table>
</form>

<div class="toolbar-calendar-div ui-widget ui-state-default">

<table border="0" cellpadding="0" cellspacing="0"
Example #2
0
    $Hour = time(date('H') + 1, 0, 0, date('m'), date('d'), date('Y'));
    return date('H', $Hour);
}
if ((!isset($argv[1]) || $argv[1] != SCHEDULE_KEY) && !check_perms('admin_schedule')) {
    // authorization, Fix to allow people with perms hit this page.
    error(403);
}
if (check_perms('admin_schedule')) {
    authorize();
    View::show_header();
    echo '<pre>';
}
$DB->query("\n\tSELECT NextHour, NextDay, NextBiWeekly\n\tFROM schedule");
list($Hour, $Day, $BiWeek) = $DB->next_record();
$NextHour = next_hour();
$NextDay = next_day();
$NextBiWeek = next_biweek();
$DB->query("\n\tUPDATE schedule\n\tSET\n\t\tNextHour = {$NextHour},\n\t\tNextDay = {$NextDay},\n\t\tNextBiWeekly = {$NextBiWeek}");
$NoDaily = isset($argv[2]) && $argv[2] == 'nodaily';
$sqltime = sqltime();
echo "{$sqltime}\n";
/*************************************************************************\
//--------------Run every time ------------------------------------------//

These functions are run every time the script is executed (every 15
minutes).

\*************************************************************************/
echo "Ran every-time functions\n";
//------------- Freeleech -----------------------------------------------//
//We use this to control 6 hour freeleeches. They're actually 7 hours, but don't tell anyone.
Example #3
0
		$Values = "('".implode("', '".$sqltime."'), ('",$LogEntries)."', '".$sqltime."')";
		$DB->query('INSERT INTO log (Message, Time) VALUES '.$Values);
		echo "\nDeleted $i torrents for inactivity\n";
	}
	
	$DB->query("SELECT SimilarID FROM artists_similar_scores WHERE Score<=0");
	$SimilarIDs = implode(',',$DB->collect('SimilarID'));
	
	if($SimilarIDs) {	
		$DB->query("DELETE FROM artists_similar WHERE SimilarID IN($SimilarIDs)");
		$DB->query("DELETE FROM artists_similar_scores WHERE SimilarID IN($SimilarIDs)");
		$DB->query("DELETE FROM artists_similar_votes WHERE SimilarID IN($SimilarIDs)");
	}
	
	
	$Day = next_day();
}
/*************************************************************************\
//--------------Run twice per month -------------------------------------//

These functions are twice per month, on the 8th and the 22nd.

\*************************************************************************/

if($BiWeek != next_biweek() || $_GET['runbiweek']) {
	echo "Ran bi-weekly functions\n";

	//------------- Cycle auth keys -----------------------------------------//

	$DB->query("UPDATE users_info
	SET AuthKey =