本文整理汇总了PHP中Queue::find方法的典型用法代码示例。如果您正苦于以下问题:PHP Queue::find方法的具体用法?PHP Queue::find怎么用?PHP Queue::find使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Queue
的用法示例。
在下文中一共展示了Queue::find方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: is_pendingRecord
static function is_pendingRecord($domain_name = null, $r = array())
{
$awnser = false;
if (count($r) > 0) {
$qFindResult = Queue::find('first', array('conditions' => 'commit_date IS NULL AND closed = 0 AND domain_name=' . Domain::quote($domain_name)));
if (count($qFindResult->queue_item_records) > 0) {
foreach ($qFindResult->queue_item_records as $key) {
if ($key->name === $r->name && $key->content === $r->content && $key->type === $r->type) {
return $awnser = true;
}
}
}
}
return $awnser;
}
示例2: queue
function queue($id = FALSE)
{
$this->load->helper('notification');
if ($_POST) {
unset($_POST['send']);
unset($_POST['_wysihtml5_mode']);
$id = $_POST['id'];
unset($_POST['id']);
$ticket = Ticket::find_by_id($id);
$attr = array('queue_id' => $_POST['queue_id']);
$ticket->update_attributes($attr);
if (!$ticket) {
$this->session->set_flashdata('message', 'error:' . $this->lang->line('messages_assign_queue_error'));
} else {
$this->session->set_flashdata('message', 'success:' . $this->lang->line('messages_assign_queue_success'));
}
redirect('tickets/view/' . $id);
} else {
$this->view_data['queues'] = Queue::find('all', array('conditions' => array('inactive=?', '0')));
$this->view_data['ticket'] = Ticket::find_by_id($id);
$this->theme_view = 'modal';
$this->view_data['title'] = $this->lang->line('application_queue');
$this->view_data['form_action'] = 'tickets/queue';
$this->content_view = 'tickets/_queue';
}
}
示例3: exit
<?php
require_once 'base.php';
require_once $class_root . 'Queue.php';
print $display->header();
if (!preg_match('/^\\d+$/', $_GET['id'])) {
print $display->error("You hacker!");
print $display->footer();
exit(1);
}
try {
$q = Queue::find($_GET['id']);
$qdomain = $q->queue_item_domains;
$qrecord = $q->queue_item_records;
} catch (Exception $e) {
print $e->getMessage();
print $display->footer();
exit(0);
}
?>
<script type="text/javascript">
function queueItem_delete(id, method) {
new Ajax.Request('api/jsonrpc.php', {
method: 'post',
parameters: {"jsonrpc": "2.0", "method": method, "params": id , "id": 1},
onSuccess: function(r) {
var json = r.responseText.evalJSON();
if(json.error) {
示例4: array
<?php
require_once 'base.php';
require_once $class_root . 'Queue.php';
print $display->header();
try {
$qFindResult = Queue::find('all', array('conditions' => 'commit_date IS NULL AND archived = 0'));
} catch (Exception $e) {
print $e->getMessage();
print $display->footer();
exit(0);
}
?>
<script type="text/javascript">
function queue_commit(id) {
new Ajax.Request('api/jsonrpc.php', {
method: 'post',
parameters: {"jsonrpc": "2.0", "method": 'queue_commit', "params": id , "id": 1},
onSuccess: function(r) {
var json = r.responseText.evalJSON();
if(json.error) {
$('feedback').update(json.error.message + ' (' + json.error.code + ')').
setStyle({color: 'red', display: 'block'});
} else {
$('tr_entry' + id).toggleClassName('queue_commited');
$('action_entry' + id).update('Done');
queue_counter();
$('feedback').update('Request commited').setStyle({color: 'black', display: 'block'});
}
示例5: ticket
function ticket()
{
$this->view_data['breadcrumb'] = $this->lang->line('application_ticket');
$this->view_data['breadcrumb_id'] = "ticket";
$this->view_data['imap_loaded'] = false;
if (extension_loaded('mysql')) {
$this->view_data['imap_loaded'] = true;
}
if ($_POST) {
unset($_POST['send']);
if (!isset($_POST['ticket_config_active'])) {
$_POST['ticket_config_active'] = "0";
}
if (!isset($_POST['ticket_config_delete'])) {
$_POST['ticket_config_delete'] = "0";
}
if (!isset($_POST['ticket_config_ssl'])) {
$_POST['ticket_config_ssl'] = "0";
}
if (!isset($_POST['ticket_config_imap'])) {
$_POST['ticket_config_imap'] = "0";
}
$settings = Setting::first();
$settings->update_attributes($_POST);
if ($settings) {
$this->session->set_flashdata('message', 'success:' . $this->lang->line('messages_save_settings_success'));
redirect('settings/ticket');
} else {
$this->session->set_flashdata('message', 'error:' . $this->lang->line('messages_save_settings_error'));
redirect('settings/ticket');
}
} else {
$this->view_data['settings'] = Setting::first();
$this->view_data['types'] = Type::find('all', array('conditions' => array('inactive = ?', '0')));
$this->view_data['queues'] = Queue::find('all', array('conditions' => array('inactive = ?', '0')));
$this->view_data['owners'] = User::find('all', array('conditions' => array('status = ?', 'active')));
$this->view_data['form_action'] = 'settings/ticket';
$this->content_view = 'settings/ticket';
}
}
示例6: array
}});
}
</script>
<div id="feedback" style="display: none;"></div>
<br>
<?php
#
#
#
$qFindResult = Queue::find('all', array('conditions' => 'commit_date IS NULL'));
print '<div class="header">' . Queue::count_all_pendingDomains() . ' pending domain changes</div><br>';
if (count($qFindResult) > 0) {
print '<table><tr><th>Function</th><th>Name</th><th>Type</th><th>By</th></tr>';
foreach ($qFindResult as $entry) {
foreach ($entry->queue_item_domains as $item) {
print '<tr class="domain"><td>' . $item->function . '</td><td>' . $item->name . '</td><td>' . $item->type . '</td><td>' . $item->user_id . '</td></tr>';
}
}
print '</table><br><br>';
}
#
#
#
$result = ActiveRecord::query("SELECT COUNT(*) AS count FROM domains");
$dCount = (int) $result[0]['count'];
示例7: queue_delete
public function queue_delete($p)
{
$q = Queue::find($p);
return $q->destroy();
}