当前位置: 首页>>代码示例>>PHP>>正文


PHP Queue::find方法代码示例

本文整理汇总了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;
 }
开发者ID:petski,项目名称:SnapElements,代码行数:15,代码来源:Queue.php

示例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';
     }
 }
开发者ID:anteknik,项目名称:tomanage,代码行数:26,代码来源:tickets.php

示例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) {
开发者ID:petski,项目名称:SnapElements,代码行数:31,代码来源:queue_list.php

示例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'});
						}
开发者ID:petski,项目名称:SnapElements,代码行数:31,代码来源:queue.php

示例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';
     }
 }
开发者ID:timclifford,项目名称:freelance-manager,代码行数:40,代码来源:settings.php

示例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'];
开发者ID:petski,项目名称:SnapElements,代码行数:31,代码来源:domain_list.php

示例7: queue_delete

 public function queue_delete($p)
 {
     $q = Queue::find($p);
     return $q->destroy();
 }
开发者ID:petski,项目名称:SnapElements,代码行数:5,代码来源:Services.php


注:本文中的Queue::find方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。