本文整理汇总了PHP中create_time函数的典型用法代码示例。如果您正苦于以下问题:PHP create_time函数的具体用法?PHP create_time怎么用?PHP create_time使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了create_time函数的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: get_past_matches
/**
* Show past CodeZone matches for user to select
*/
function get_past_matches()
{
$db = $this->db;
$_pre = $this->_pre;
//This is a perfect query that gets rid of checking whether there's an active match
$query = "SELECT * FROM " . $_pre . "matches WHERE (start_time+duration)<" . time() . " ORDER BY start_time DESC";
$db->setQuery($query);
?>
<div id='past_matches_list'>
<h3 class='arena-match-title'>CodeZone Practice mode .::. MATCH ARCHIVE</h3>
<hr class='h3-bottom-line' />
<table border="0" cellspacing="0" cellpadding="3">
<tr class='theader'>
<td>M::No</td><td>Match Title</td><td>View Scoreboard</td><td>Analysis</td><td>Date</td><td>Duration (hrs)</td><td>Points</td>
</tr>
<?php
while ($row = $db->fetch_assoc()) {
$duration = create_time($row['duration']);
$duration = $duration['hrs'] . ':' . $duration['min'] . ':' . $duration['sec'];
echo "<tr class='tr_data_large'><td>{$row['id']}</td><td><a href='index.php?a=practice&do=load_practice_arena&m_id={$row['id']}'>{$row['title']}</a></td><td><a href='index.php?a=scoreboard&m_tn=" . base64_encode($row['match_table_name']) . "'>view scoreboard</a></td><td><a href='index.php?a=practice&do=view_analysis&m_id={$row['id']}'>view analysis</a></td><td>" . date("j \\of\f F Y, \\a\\t g:i:s a", $row['start_time']) . "</td><td>{$duration}</td><td>{$row['match_points']}</td></tr>";
}
?>
</table>
<p><i>To practice, click on a match title of your choice</i>. In CodeZone practice mode, you are free to download input files and submit output files as much as you like. No time limits!</p>
</div>
<?php
}
示例2: AddScheduler
function AddScheduler()
{
include_once 'install/install_utils.php';
require_once 'modules/Schedulers/Scheduler.php';
$scheduler = new Scheduler();
$scheduler->retrieve_by_string_fields(array('job' => 'function::processAOW_Workflow'));
if ($scheduler->id == '') {
$scheduler->name = 'Run AOW WorkFlow';
$scheduler->job = 'function::processAOW_Workflow';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '*::*::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '0';
$scheduler->save();
}
}
示例3: loadCoderSource
function loadCoderSource()
{
global $db, $_pre;
$match_table_name = $_GET['dir'];
$reg_no = $_GET['reg_no'];
$files = $_GET['files'];
if ($files == '') {
echo "{'state': false,'message':'No source code files submitted for {$reg_no}'}";
return;
}
$query = "SELECT * FROM {$_pre}{$match_table_name} WHERE registration_no='{$reg_no}' LIMIT 1";
$db->setQuery($query);
if ($db->foundRows < 1) {
echo "{'state': false,'message':'Coder registration number invalid'}";
return;
}
$coder_data = $db->fetch_assoc();
$tmp = create_time($coder_data['time_taken']);
$time_taken = $tmp['hrs'] . 'hrs, ' . $tmp['min'] . 'min, ' . $tmp['sec'] . 'sec';
$source_code_path = base64_encode('..' . DS . 'competition_uploads' . DS . $match_table_name . DS . $coder_data['actual_file']);
echo "{'state': true,'message':'Coder source loaded successfully','vs_source':'{$source_code_path}','vs_coder_name':'{$coder_data['nick_name']}','vs_language':'{$coder_data['language']}','vs_disqualified':{$coder_data['disqualified']},'vs_downloads':'{$coder_data['downloads_count']}','vs_submissions':{$coder_data['submissions']},'vs_correct':{$coder_data['correct']},'vs_lst':{$coder_data['last_submission_time']},'vs_code_tt':'{$time_taken}','vs_score':{$coder_data['points']},reg_no:'{$reg_no}'}";
}
示例4: rebuildDefaultSchedulers
/**
* Archives schedulers of the same functionality, then instantiates new
* ones.
*/
function rebuildDefaultSchedulers()
{
global $mod_strings;
// truncate scheduler-related tables
$this->db->query('DELETE FROM schedulers');
$sched3 = new Scheduler();
$sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
$sched3->job = 'function::trimTracker';
$sched3->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched3->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched3->job_interval = '0::2::1::*::*';
$sched3->status = 'Active';
$sched3->created_by = '1';
$sched3->modified_user_id = '1';
$sched3->catch_up = '1';
$sched3->save();
$sched4 = new Scheduler();
$sched4->name = $mod_strings['LBL_OOTB_IE'];
$sched4->job = 'function::pollMonitoredInboxes';
$sched4->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched4->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched4->job_interval = '*::*::*::*::*';
$sched4->status = 'Active';
$sched4->created_by = '1';
$sched4->modified_user_id = '1';
$sched4->catch_up = '0';
$sched4->save();
$sched5 = new Scheduler();
$sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
$sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
$sched5->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched5->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched5->job_interval = '0::2-6::*::*::*';
$sched5->status = 'Active';
$sched5->created_by = '1';
$sched5->modified_user_id = '1';
$sched5->catch_up = '1';
$sched5->save();
$sched6 = new Scheduler();
$sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
$sched6->job = 'function::runMassEmailCampaign';
$sched6->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched6->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched6->job_interval = '0::2-6::*::*::*';
$sched6->status = 'Active';
$sched6->created_by = '1';
$sched6->modified_user_id = '1';
$sched6->catch_up = '1';
$sched6->save();
$sched7 = new Scheduler();
$sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
$sched7->job = 'function::pruneDatabase';
$sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched7->job_interval = '0::4::1::*::*';
$sched7->status = 'Inactive';
$sched7->created_by = '1';
$sched7->modified_user_id = '1';
$sched7->catch_up = '0';
$sched7->save();
$sched12 = new Scheduler();
$sched12->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
$sched12->job = 'function::sendEmailReminders';
$sched12->date_time_start = create_date(2008, 1, 1) . ' ' . create_time(0, 0, 1);
$sched12->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched12->job_interval = '*::*::*::*::*';
$sched12->status = 'Active';
$sched12->created_by = '1';
$sched12->modified_user_id = '1';
$sched12->catch_up = '0';
$sched12->save();
}
示例5: Scheduler
$sched6 = new Scheduler();
$sched6->name = 'Run Nightly Mass Email Campaigns';
$sched6->job = 'function::runMassEmailCampaign';
$sched6->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched6->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched6->job_interval = '0::2-6::*::*::*';
$sched6->status = 'Active';
$sched6->created_by = '1';
$sched6->modified_user_id = '1';
$sched6->catch_up = '1';
$sched6->save();
$sched7 = new Scheduler();
$sched7->name = 'Prune Database on 1st of Month';
$sched7->job = 'function::pruneDatabase';
$sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched7->job_interval = '0::4::1::*::*';
$sched7->status = 'Inactive';
$sched7->created_by = '1';
$sched7->modified_user_id = '1';
$sched7->catch_up = '0';
$sched7->save();
} else {
$scheduler->rebuildDefaultSchedulers();
}
echo $mod_strings['LBL_PERFORM_DONE'];
// Enable Sugar Feeds and add all feeds by default
installLog("Enable SugarFeeds");
enableSugarFeeds();
// Enable the InsideView connector and add all modules
installLog("Enable InsideView Connector");
示例6: getDefaultSystemSchedulers
/**
* Return OOTB Schedulers.
* @return array
*/
public function getDefaultSystemSchedulers()
{
$schedulers = array();
$mod_strings = return_module_language($GLOBALS['current_language'], 'Schedulers');
/** @var Scheduler $scheduler */
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_WORKFLOW'];
$scheduler->job = 'function::processWorkflow';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '*::*::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '0';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_REPORTS'];
$scheduler->job = 'function::processQueue';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '0::6::*::*::*';
$scheduler->status = 'Inactive';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '1';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_TRACKER'];
$scheduler->job = 'function::trimTracker';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '0::2::1::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '1';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_IE'];
$scheduler->job = 'function::pollMonitoredInboxes';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '*::*::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '0';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_BOUNCE'];
$scheduler->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '0::2-6::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '1';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
$scheduler->job = 'function::runMassEmailCampaign';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '0::2-6::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '1';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_PRUNE'];
$scheduler->job = 'function::pruneDatabase';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '0::4::1::*::*';
$scheduler->status = 'Inactive';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '0';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_UPDATE_TRACKER_SESSIONS'];
$scheduler->job = 'function::updateTrackerSessions';
$scheduler->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$scheduler->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$scheduler->job_interval = '*::*::*::*::*';
$scheduler->status = 'Active';
$scheduler->created_by = '1';
$scheduler->modified_user_id = '1';
$scheduler->catch_up = '1';
$schedulers[$scheduler->job] = $scheduler;
$scheduler = BeanFactory::getBean('Schedulers');
$scheduler->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
$scheduler->job = 'function::sendEmailReminders';
//.........这里部分代码省略.........
示例7: defined
| Author url: {@link http://sureronald.blogspot.com} |
| License: GNU/GPL |
| Description: CodeZone shedule |
| |
*----------------------------------------------------------*
*/
//Is in application...?
defined('IN_APP') or die('Restricted access');
if ($action == 'schedule') {
echo "<h3 class='arena-match-title'>CodeZone match schedule</h3>\n\t<hr class='h3-bottom-line' />";
echo "<div id='schedule'>";
$query = "SELECT * FROM " . $_pre . "matches WHERE start_time>" . time() . " ORDER BY start_time";
$db->setQuery($query);
if ($db->foundRows == 0) {
echo "<p>There are no upcoming contests, Please check back soon! You can always practice <a href='index.php?a=practice'>here</a> with old CodeZone contests</p>";
} else {
?>
<table border="0" cellspacing="0" cellpadding="3">
<tr class='theader'>
<td>M::No</td><td>Match Title</td><td>Difficulty / 100</td><td>Affects ranking?</td><td>Date</td><td>Duration (hrs)</td><td>Points</td>
</tr>
<?php
while ($row = $db->fetch_assoc()) {
$duration = create_time($row['duration']);
$duration = $duration['hrs'] . ':' . $duration['min'] . ':' . $duration['sec'];
echo "<tr class='tr_data_large'><td>{$row['id']}</td><td>{$row['title']}</td><td>{$row['difficulty']}</td><td>" . ($row['match_ranked'] ? "yes" : "no") . "</td><td>" . date("j \\of\f F Y, \\a\\t g:i:s a", $row['start_time']) . "</td><td>{$duration}</td><td>{$row['match_points']}</td></tr>";
}
echo "</table>";
}
echo "</div>";
}
示例8: Email
$meeting->status = $app_list_strings['meeting_status_dom'][$key];
$meeting->contact_id = $contact->id;
$meeting->parent_id = $account_id;
$meeting->parent_type = 'Accounts';
// dont update vcal
$meeting->update_vcal = false;
$meeting->save();
// leverage the seed user to set the acceptance status on the meeting.
$seed_user->id = $meeting->assigned_user_id;
$meeting->set_accept_status($seed_user, 'accept');
//Create new emails
$email = new Email();
$key = array_rand($email->default_email_subject_values);
$email->name = $email->default_email_subject_values[$key];
$email->date_start = create_date();
$email->time_start = create_time();
$email->duration_hours = array_rand($possible_duration_hours_arr);
$email->duration_minutes = array_rand($possible_duration_minutes_arr);
$email->assigned_user_id = $assigned_user_id;
$email->assigned_user_id = $contacts_account->assigned_user_id;
$email->assigned_user_name = $contacts_account->assigned_user_name;
$email->description = 'Discuss project plan and hash out the details of implementation';
$email->status = 'sent';
$email->parent_id = $account_id;
$email->parent_type = 'Accounts';
$email->to_addrs = $contact->emailAddress->getPrimaryAddress($contact);
$email->from_addr = $assignedUser->emailAddress->getPrimaryAddress($assignedUser);
$email->from_addr_name = $email->from_addr;
$email->to_addrs_names = $email->to_addrs;
$email->type = 'out';
$email->save();
示例9: rebuildDefaultSchedulers
/**
* Archives schedulers of the same functionality, then instantiates new
* ones.
*/
function rebuildDefaultSchedulers()
{
$mod_strings = return_module_language($GLOBALS['current_language'], 'Schedulers');
// truncate scheduler-related tables
$this->db->query('DELETE FROM schedulers');
$sched1 = new Scheduler();
$sched1->name = $mod_strings['LBL_OOTB_WORKFLOW'];
$sched1->job = 'function::processAOW_Workflow';
$sched1->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched1->date_time_end = null;
$sched1->job_interval = '*::*::*::*::*';
$sched1->status = 'Active';
$sched1->created_by = '1';
$sched1->modified_user_id = '1';
$sched1->catch_up = '1';
$sched1->save();
$sched2 = new Scheduler();
$sched2->name = $mod_strings['LBL_OOTB_REPORTS'];
$sched2->job = 'function::aorRunScheduledReports';
$sched2->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched2->date_time_end = null;
$sched2->job_interval = '*::*::*::*::*';
$sched2->status = 'Active';
$sched2->created_by = '1';
$sched2->modified_user_id = '1';
$sched2->catch_up = '1';
$sched2->save();
$sched3 = new Scheduler();
$sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
$sched3->job = 'function::trimTracker';
$sched3->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched3->date_time_end = null;
$sched3->job_interval = '0::2::1::*::*';
$sched3->status = 'Active';
$sched3->created_by = '1';
$sched3->modified_user_id = '1';
$sched3->catch_up = '1';
$sched3->save();
$sched4 = new Scheduler();
$sched4->name = $mod_strings['LBL_OOTB_IE'];
$sched4->job = 'function::pollMonitoredInboxesAOP';
$sched4->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched4->date_time_end = null;
$sched4->job_interval = '*::*::*::*::*';
$sched4->status = 'Active';
$sched4->created_by = '1';
$sched4->modified_user_id = '1';
$sched4->catch_up = '0';
$sched4->save();
$sched5 = new Scheduler();
$sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
$sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
$sched5->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched5->date_time_end = null;
$sched5->job_interval = '0::2-6::*::*::*';
$sched5->status = 'Active';
$sched5->created_by = '1';
$sched5->modified_user_id = '1';
$sched5->catch_up = '1';
$sched5->save();
$sched6 = new Scheduler();
$sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
$sched6->job = 'function::runMassEmailCampaign';
$sched6->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched6->date_time_end = null;
$sched6->job_interval = '0::2-6::*::*::*';
$sched6->status = 'Active';
$sched6->created_by = '1';
$sched6->modified_user_id = '1';
$sched6->catch_up = '1';
$sched6->save();
$sched7 = new Scheduler();
$sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
$sched7->job = 'function::pruneDatabase';
$sched7->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched7->date_time_end = null;
$sched7->job_interval = '0::4::1::*::*';
$sched7->status = 'Inactive';
$sched7->created_by = '1';
$sched7->modified_user_id = '1';
$sched7->catch_up = '0';
$sched7->save();
$sched8 = new Scheduler();
$sched8->name = $mod_strings['LBL_OOTB_LUCENE_INDEX'];
$sched8->job = 'function::aodIndexUnindexed';
$sched8->date_time_start = create_date(2015, 1, 1) . ' ' . create_time(0, 0, 1);
$sched8->date_time_end = null;
$sched8->job_interval = "0::0::*::*::*";
$sched8->status = 'Active';
$sched8->created_by = '1';
$sched8->modified_user_id = '1';
$sched8->catch_up = '0';
$sched8->save();
$sched9 = new Scheduler();
$sched9->name = $mod_strings['LBL_OOTB_OPTIMISE_INDEX'];
$sched9->job = 'function::aodOptimiseIndex';
//.........这里部分代码省略.........
示例10: rebuildDefaultSchedulers
/**
* Archives schedulers of the same functionality, then instantiates new
* ones.
*/
function rebuildDefaultSchedulers()
{
$mod_strings = return_module_language($GLOBALS['current_language'], 'Schedulers');
// truncate scheduler-related tables
$this->db->query('DELETE FROM schedulers');
$sched3 = new Scheduler();
$sched3->name = $mod_strings['LBL_OOTB_TRACKER'];
$sched3->job = 'function::trimTracker';
$sched3->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched3->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched3->job_interval = '0::2::1::*::*';
$sched3->status = 'Active';
$sched3->created_by = '1';
$sched3->modified_user_id = '1';
$sched3->catch_up = '1';
$sched3->save();
$sched4 = new Scheduler();
$sched4->name = $mod_strings['LBL_OOTB_IE'];
$sched4->job = 'function::pollMonitoredInboxes';
$sched4->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched4->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched4->job_interval = '*::*::*::*::*';
$sched4->status = 'Active';
$sched4->created_by = '1';
$sched4->modified_user_id = '1';
$sched4->catch_up = '0';
$sched4->save();
$sched5 = new Scheduler();
$sched5->name = $mod_strings['LBL_OOTB_BOUNCE'];
$sched5->job = 'function::pollMonitoredInboxesForBouncedCampaignEmails';
$sched5->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched5->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched5->job_interval = '0::2-6::*::*::*';
$sched5->status = 'Active';
$sched5->created_by = '1';
$sched5->modified_user_id = '1';
$sched5->catch_up = '1';
$sched5->save();
$sched6 = new Scheduler();
$sched6->name = $mod_strings['LBL_OOTB_CAMPAIGN'];
$sched6->job = 'function::runMassEmailCampaign';
$sched6->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched6->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched6->job_interval = '0::2-6::*::*::*';
$sched6->status = 'Active';
$sched6->created_by = '1';
$sched6->modified_user_id = '1';
$sched6->catch_up = '1';
$sched6->save();
$sched7 = new Scheduler();
$sched7->name = $mod_strings['LBL_OOTB_PRUNE'];
$sched7->job = 'function::pruneDatabase';
$sched7->date_time_start = create_date(2005, 1, 1) . ' ' . create_time(0, 0, 1);
$sched7->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched7->job_interval = '0::4::1::*::*';
$sched7->status = 'Inactive';
$sched7->created_by = '1';
$sched7->modified_user_id = '1';
$sched7->catch_up = '0';
$sched7->save();
$sched12 = new Scheduler();
$sched12->name = $mod_strings['LBL_OOTB_SEND_EMAIL_REMINDERS'];
$sched12->job = 'function::sendEmailReminders';
$sched12->date_time_start = create_date(2008, 1, 1) . ' ' . create_time(0, 0, 1);
$sched12->date_time_end = create_date(2020, 12, 31) . ' ' . create_time(23, 59, 59);
$sched12->job_interval = '*::*::*::*::*';
$sched12->status = 'Active';
$sched12->created_by = '1';
$sched12->modified_user_id = '1';
$sched12->catch_up = '0';
$sched12->save();
$sched13 = new Scheduler();
$sched13->name = $mod_strings['LBL_OOTB_CLEANUP_QUEUE'];
$sched13->job = 'function::cleanJobQueue';
$sched13->date_time_start = create_date(2012, 1, 1) . ' ' . create_time(0, 0, 1);
$sched13->date_time_end = create_date(2030, 12, 31) . ' ' . create_time(23, 59, 59);
$sched13->job_interval = '0::5::*::*::*';
$sched13->status = 'Active';
$sched13->created_by = '1';
$sched13->modified_user_id = '1';
$sched13->catch_up = '0';
$sched13->save();
$sched14 = new Scheduler();
$sched14->name = $mod_strings['LBL_OOTB_REMOVE_DOCUMENTS_FROM_FS'];
$sched14->job = 'function::removeDocumentsFromFS';
$sched14->date_time_start = create_date(2012, 1, 1) . ' ' . create_time(0, 0, 1);
$sched14->date_time_end = create_date(2030, 12, 31) . ' ' . create_time(23, 59, 59);
$sched14->job_interval = '0::3::1::*::*';
$sched14->status = 'Active';
$sched14->created_by = '1';
$sched14->modified_user_id = '1';
$sched14->catch_up = '0';
$sched14->save();
$sched15 = new Scheduler();
$sched15->name = $mod_strings['LBL_OOTB_SUGARFEEDS'];
$sched15->job = 'function::trimSugarFeeds';
//.........这里部分代码省略.........
示例11: array
echo $md['match_points'];
?>
</td><td>Language</td><td>Download source file</td>
</tr>
<?php
$submissions_total = 0;
$submissions_correct = 0;
$coders = array();
//Initialize coders array: holds the each user details in preparation for sorting
while ($row = $db->fetch_assoc()) {
array_push($coders, $row);
$submissions_total += $row['submissions'];
$submissions_correct += $row['correct'];
}
$coders = sort_coders_array($coders);
$i = 1;
for ($x = 0; $x < count($coders); $x++) {
$time_taken = create_time($coders[$x]['time_taken']);
$time_taken = $time_taken['hrs'] . ':' . $time_taken['min'] . ':' . $time_taken['sec'];
echo "<tr class='tr_data_large'><td>{$i}</td><td><a class='coder_nickname' href='index.php?a=profile&do=viewProfile&nick_name={$coders[$x]['nick_name']}'><span class='" . get_user_class($coders[$x]['ranking_pts']) . "'>{$coders[$x]['nick_name']}</span></a></td><td>{$time_taken}</td><td>{$coders[$x]['submissions']}</td><td>{$coders[$x]['points']}</td><td>{$coders[$x]['language']}</td><td><a href='javascript:void(0);' >Download source file</a></td></tr>";
$i++;
}
}
?>
</table>
<?php
echo "<span class='dark1'>Statistics</span><br />";
echo "<span><b>Submissions total:</b> {$submissions_total}</span><br />";
echo "<span><b>Correct:</b> {$submissions_correct}/{$submissions_total} (" . number_format(@($submissions_correct / $submissions_total * 100), 2) . "%)</span>";
?>
<p><i>Scoreboard automatically refreshes every 60 seconds</i></p>
示例12: mt_rand
$note->parent_id = $account->id;
$seed_data_index = mt_rand(0, 3);
$note->name = $note_seed_names_and_Descriptions[$seed_data_index][0];
$note->description = $note_seed_names_and_Descriptions[$seed_data_index][1];
$note->assigned_user_id = $account->assigned_user_id;
$note->assigned_user_name = $account->assigned_user_name;
$note->save();
$call = new Call();
$call->parent_type = 'Accounts';
$call->parent_id = $account->id;
$call->name = $call_seed_data_names[mt_rand(0, 3)];
$call->assigned_user_id = $account->assigned_user_id;
$call->assigned_user_name = $account->assigned_user_name;
$call->direction = 'Outbound';
$call->date_start = create_date();
$call->time_start = create_time();
$call->duration_hours = '0';
$call->duration_minutes = '30';
$call->account_id = $account->id;
$call->status = 'Planned';
$call->save();
//Create new opportunities
$opp = new Opportunity();
$opp->assigned_user_id = $account->assigned_user_id;
$opp->assigned_user_name = $account->assigned_user_name;
$opp->name = substr($account_name . " - 1000 units", 0, 50);
$opp->date_closed = create_date();
$key = array_rand($app_list_strings['lead_source_dom']);
$opp->lead_source = $app_list_strings['lead_source_dom'][$key];
$key = array_rand($app_list_strings['sales_stage_dom']);
$opp->sales_stage = $app_list_strings['sales_stage_dom'][$key];