本文整理汇总了PHP中Ticket::dropdownMyDevices方法的典型用法代码示例。如果您正苦于以下问题:PHP Ticket::dropdownMyDevices方法的具体用法?PHP Ticket::dropdownMyDevices怎么用?PHP Ticket::dropdownMyDevices使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ticket
的用法示例。
在下文中一共展示了Ticket::dropdownMyDevices方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getHelpdesk
//.........这里部分代码省略.........
$condition .= " AND `is_incident`='1'";
}
$opt = array('value' => $values['itilcategories_id'], 'condition' => $condition, 'on_change' => 'submit()');
if ($values['itilcategories_id'] && $tt->isMandatoryField("itilcategories_id")) {
$opt['display_emptychoice'] = false;
}
ITILCategory::dropdown($opt);
echo "</td></tr>";
if ($CFG_GLPI['urgency_mask'] != 1 << 3) {
if (!$tt->isHiddenField('urgency')) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . sprintf(__('%1$s%2$s'), __('Urgency'), $tt->getMandatoryMark('urgency')) . "</td>";
echo "<td>";
Ticket::dropdownUrgency(array('value' => $values["urgency"]));
echo "</td></tr>";
}
}
if (empty($delegating) && NotificationTargetTicket::isAuthorMailingActivatedForHelpdesk()) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . __('Inform me about the actions taken') . "</td>";
echo "<td>";
if ($values["_users_id_requester"] == 0) {
$values['_users_id_requester'] = Session::getLoginUserID();
}
$_POST['value'] = $values['_users_id_requester'];
$_POST['field'] = '_users_id_requester_notif';
$_POST['use_notification'] = $values['_users_id_requester_notif']['use_notification'];
include GLPI_ROOT . "/ajax/uemailUpdate.php";
echo "</td></tr>";
}
if ($_SESSION["glpiactiveprofile"]["helpdesk_hardware"] != 0) {
if (!$tt->isHiddenField('itemtype')) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . sprintf(__('%1$s%2$s'), __('Hardware type'), $tt->getMandatoryMark('itemtype')) . "</td>";
echo "<td>";
Ticket::dropdownMyDevices($values['_users_id_requester'], $_SESSION["glpiactive_entity"], $values['itemtype'], $values['items_id']);
Ticket::dropdownAllDevices("itemtype", $values['itemtype'], $values['items_id'], 0, $values['_users_id_requester'], $_SESSION["glpiactive_entity"]);
echo "<span id='item_ticket_selection_information'></span>";
echo "</td></tr>";
}
}
if (!$tt->isHiddenField('locations_id')) {
echo "<tr class='tab_bg_1'><td>";
printf(__('%1$s%2$s'), __('Location'), $tt->getMandatoryMark('locations_id'));
echo "</td><td>";
Location::dropdown(array('value' => $values["locations_id"]));
echo "</td></tr>";
}
if (!$tt->isHiddenField('name') || $tt->isPredefinedField('name')) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . sprintf(__('%1$s%2$s'), __('Title'), $tt->getMandatoryMark('name')) . "</td>";
echo "<td><input type='text' maxlength='250' size='80' name='name'\n value=\"" . $values['name'] . "\"></td></tr>";
}
if (!$tt->isHiddenField('content') || $tt->isPredefinedField('content')) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . sprintf(__('%1$s%2$s'), __('Description'), $tt->getMandatoryMark('content')) . "</td>";
// * Changed by plugin surveyticket
// * Added by plugin surveyticket
$psTicketTemplate = new PluginSurveyticketTicketTemplate();
$psSurvey = new PluginSurveyticketSurvey();
$plugin_surveyticket_surveys_id = 0;
$a_tickettemplates = current($psTicketTemplate->find("`tickettemplates_id`='" . $tt->fields['id'] . "'\n AND `type`='" . $values['type'] . "'\n AND `is_helpdesk`='1'"));
if (isset($a_tickettemplates['plugin_surveyticket_surveys_id'])) {
echo "<td>";
$psSurvey = new PluginSurveyticketSurvey();
$psSurvey->getFromDB($a_tickettemplates['plugin_surveyticket_surveys_id']);
if ($psSurvey->fields['is_active'] == 1) {
$plugin_surveyticket_surveys_id = $a_tickettemplates['plugin_surveyticket_surveys_id'];
$psSurvey = new PluginSurveyticketSurvey();
$psSurvey->startSurvey($plugin_surveyticket_surveys_id);
}
} else {
echo "<td><textarea name='content' cols='80' rows='14'>" . $values['content'] . "</textarea>";
}
// * End of change
echo "</td></tr>";
}
echo "<tr class='tab_bg_1'>";
echo "<td>" . sprintf(__('%1$s (%2$s)'), __('File'), Document::getMaxUploadSize());
echo "<img src='" . $CFG_GLPI["root_doc"] . "/pics/aide.png' class='pointer' alt='" . __s('Help') . "' onclick=\"window.open('" . $CFG_GLPI["root_doc"] . "/front/documenttype.list.php','Help','scrollbars=1,resizable=1,width=1000,height=800')\">";
echo " ";
Ticket::showDocumentAddButton(60);
echo "</td>";
echo "<td><div id='uploadfiles'><input type='file' name='filename[]' value='' size='60'></div>";
echo "</td></tr>";
if (!$ticket_template) {
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2' class='center'>";
if ($tt->isField('id') && $tt->fields['id'] > 0) {
echo "<input type='hidden' name='_tickettemplates_id' value='" . $tt->fields['id'] . "'>";
echo "<input type='hidden' name='_predefined_fields'\n value=\"" . Toolbox::prepareArrayForInput($predefined_fields) . "\">";
}
echo "<input type='submit' name='add' value=\"" . __s('Submit message') . "\" class='submit'>";
echo "</td></tr>";
}
echo "</table></div>";
if (!$ticket_template) {
Html::closeForm();
}
}
示例2: header
http://indepnet.net/ http://glpi-project.org
-------------------------------------------------------------------------
LICENSE
This file is part of GLPI.
GLPI is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
GLPI is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with GLPI. If not, see <http://www.gnu.org/licenses/>.
--------------------------------------------------------------------------
*/
/** @file
* @brief
*/
$AJAX_INCLUDE = 1;
include '../inc/includes.php';
header("Content-Type: text/html; charset=UTF-8");
Html::header_nocache();
Session::checkRight("update_ticket", "1");
Ticket::dropdownMyDevices($_POST["userID"], $_POST["entity_restrict"]);
Html::ajaxFooter();
示例3: printHelpDesk
//.........这里部分代码省略.........
}
$itemtype = 0;
$items_id = "";
$content = "";
$title = "";
$ticketcategories_id = 0;
$urgency = 3;
$type = 0;
if (isset($_SESSION["helpdeskSaved"]['_users_id_requester_notif']) && isset($_SESSION["helpdeskSaved"]['_users_id_requester_notif']['use_notification'])) {
$use_email_notification = stripslashes($_SESSION["helpdeskSaved"]['_users_id_requester_notif']['use_notification']);
}
if (isset($_SESSION["helpdeskSaved"]["email"])) {
$email = stripslashes($_SESSION["helpdeskSaved"]["user_email"]);
}
if (isset($_SESSION["helpdeskSaved"]["itemtype"])) {
$itemtype = stripslashes($_SESSION["helpdeskSaved"]["itemtype"]);
}
if (isset($_SESSION["helpdeskSaved"]["items_id"])) {
$items_id = stripslashes($_SESSION["helpdeskSaved"]["items_id"]);
}
if (isset($_SESSION["helpdeskSaved"]["content"])) {
$content = cleanPostForTextArea($_SESSION["helpdeskSaved"]["content"]);
}
if (isset($_SESSION["helpdeskSaved"]["name"])) {
$title = stripslashes($_SESSION["helpdeskSaved"]["name"]);
}
if (isset($_SESSION["helpdeskSaved"]["ticketcategories_id"])) {
$ticketcategories_id = stripslashes($_SESSION["helpdeskSaved"]["ticketcategories_id"]);
}
if (isset($_SESSION["helpdeskSaved"]["type"])) {
$type = stripslashes($_SESSION["helpdeskSaved"]["type"]);
}
if (isset($_SESSION["helpdeskSaved"]["urgency"])) {
$urgency = stripslashes($_SESSION["helpdeskSaved"]["urgency"]);
}
unset($_SESSION["helpdeskSaved"]);
echo "<form method='post' name='helpdeskform' action='" . $CFG_GLPI["root_doc"] . "/front/tracking.injector.php' enctype='multipart/form-data'>";
echo "<input type='hidden' name='_from_helpdesk' value='{$from_helpdesk}'>";
echo "<input type='hidden' name='requesttypes_id' value='" . RequestType::getDefault('helpdesk') . "'>";
if ($CFG_GLPI['urgency_mask'] == 1 << 3) {
// Dont show dropdown if only 1 value enabled
echo "<input type='hidden' name='urgency' value='3'>";
}
echo "<input type='hidden' name='entities_id' value='" . $_SESSION["glpiactive_entity"] . "'>";
echo "<div class='center'><table class='tab_cadre'>";
echo "<tr><th colspan='2'>" . $LANG['job'][11] . " : ";
if (isMultiEntitiesMode()) {
echo " (" . Dropdown::getDropdownName("glpi_entities", $_SESSION["glpiactive_entity"]) . ")";
}
echo "</th></tr>";
if ($CFG_GLPI['urgency_mask'] != 1 << 3) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['joblist'][29] . " : </td>";
echo "<td>";
Ticket::dropdownUrgency("urgency", $urgency);
echo "</td></tr>";
}
if (NotificationTargetTicket::isAuthorMailingActivatedForHelpdesk()) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['help'][8] . " : </td>";
echo "<td>";
$_REQUEST['value'] = getLoginUserID();
$_REQUEST['field'] = '_users_id_requester_notif';
$_REQUEST['use_notification'] = $use_email_notification;
include GLPI_ROOT . "/ajax/uemailUpdate.php";
echo "</td></tr>";
}
if ($_SESSION["glpiactiveprofile"]["helpdesk_hardware"] != 0) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['help'][24] . " : </td>";
echo "<td>";
Ticket::dropdownMyDevices(getLoginUserID(), $_SESSION["glpiactive_entity"]);
Ticket::dropdownAllDevices("itemtype", $itemtype, $items_id, 0, $_SESSION["glpiactive_entity"]);
echo "</td></tr>";
}
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['common'][17] . " : </td><td>";
Ticket::dropdownType('type', $type);
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['common'][36] . " : </td><td>";
Dropdown::show('TicketCategory', array('value' => $ticketcategories_id, 'condition' => '`is_helpdeskvisible`=1'));
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['common'][57] . " : </td>";
echo "<td><input type='text' maxlength='250' size='50' name='name' value='{$title}'></td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2'><textarea name='content' cols='78' rows='14'>{$content}</textarea>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['document'][2] . " (" . Document::getMaxUploadSize() . ") : ";
echo "<img src='" . $CFG_GLPI["root_doc"] . "/pics/aide.png' class='pointer' alt='" . $LANG['central'][7] . "' onclick=\"window.open('" . $CFG_GLPI["root_doc"] . "/front/documenttype.list.php','Help','scrollbars=1,resizable=1,width=1000,height=800')\">";
echo "</td>";
echo "<td><input type='file' name='filename' value='' size='25'></td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='2' class='center'>";
echo "<input type='submit' value=\"" . $LANG['help'][14] . "\" class='submit'>";
echo "</td></tr>";
echo "</table></div></form>";
}
示例4: show
//.........这里部分代码省略.........
echo "<select id='sel_user' onchange='getComboA(this)'>";
echo '<option value=" "> -- Selecione -- </option>';
while ($user = $DB->fetch_array($result_user)) {
echo "<option value=" . $user['id'] . " id= \"" . $user['name'] . " " . $user['sname'] . " \">" . $user['name'] . " " . $user['sname'] . "</option>";
}
echo "</select>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['job'][4] . " : </td></tr>";
echo "<tr class='center tab_bg_1'>";
echo "<td >" . $user_name . $user_sname . "</td></tr>";
echo "<input type='hidden' name='logged' value='" . $logged . "'>";
}
if ($CFG_GLPI['urgency_mask'] != 1 << 3) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['joblist'][29] . " : </td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>";
Ticket::dropdownUrgency("urgency", $urgency);
//Ticket::dropdownUrgency(array('value' => $values["urgency"]));
echo "</td></tr>";
}
if (NotificationTargetTicket::isAuthorMailingActivatedForHelpdesk()) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['help'][8] . " :</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td >";
Dropdown::showYesNo('use_email_notification', $use_email_notification);
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['plugin_mobile']["email"] . " :</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td ><input type='text' id='user_email' name='user_email' value=\"{$email}\" size='40' onchange=\"use_email_notification.value='1'\">";
echo "</td></tr>";
}
if ($_SESSION["glpiactiveprofile"]["helpdesk_hardware"] != 0) {
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['help'][24] . " : </td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td >";
//Ticket::dropdownMyDevices(Session::getLoginUserID(),$_SESSION["glpiactive_entity"]);
Ticket::dropdownMyDevices($ID, $_SESSION["glpiactive_entity"]);
echo "</td></tr>";
}
//Stevenes Donato
echo "<tr class='tab_bg_1'>";
echo "<td class='force_left'>" . $LANG['common'][36] . " :</td></tr>";
echo "<tr class='tab_bg_1'><td>";
//Dropdown::show('TicketCategory', array('value' => $itilcategories_id,'condition'=>'`is_helpdeskvisible`=1'));
//Dropdown::show('ITILCategory', array('value' => $itilcategories_id,'condition'=>'`is_helpdeskvisible`=1'));
//Dropdown::getDropdownName("glpi_itilcategories", $this->fields["itilcategories_id"]);
//Dropdown::showFromArray("completename", $ticketcategories_id);
echo "<select id='sel_cat' onchange='getComboAXXX(this)'>";
echo '<option value=" "> -- Selecione -- </option>';
while ($cat = $DB->fetch_array($result_cat)) {
echo "<option value=" . $cat['id'] . " id= \"" . $cat['completename'] . " \">" . $cat['completename'] . " </option>";
}
echo "</select>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['common'][57] . " :</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td ><input type='text' maxlength='250' size='50' name='name' value=\"{$title}\" required ></td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td>" . $LANG['joblist'][6] . " :</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='1'><textarea name='content' cols='78' rows='14' required >{$content}</textarea>";
echo "</td></tr>";
echo "<tr class='tab_bg_1'><td>" . $LANG['document'][2] . " (" . Document::getMaxUploadSize() . ") :";
/*
* we hide the picture (aide.png) to prevent the form openning in other window,
* outside the mobile plugin layout.
echo "<img src=\"".$CFG_GLPI["root_doc"]."/pics/aide.png\" class='pointer' alt=\"".
$LANG['central'][7]."\" onclick=\"window.open('".$CFG_GLPI["root_doc"].
"/front/documenttype.list.php','Help','scrollbars=1,resizable=1,width=1000,height=800')\">";
*/
echo "<input type='hidden' name='ido' value='" . $IDO . "'>";
?>
<script>
function getID() {
var ido = document.getElementById('ido').value;
document.getElementById('session').innerHTML = "$_SESSION['logged']="+ido;
//window.location.assign('".$CFG_GLPI['root_doc']."/plugins/mobile/front/helpdesk.php?id='+id+'&session=".$IDO."');
}
</script>
<div id="session" style="display:none;"></div>
<?php
echo "</td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td><input type='file' class='ui-input-text ui-body-null ui-corner-all ui-shadow-inset ui-body-c' name='filename' value=\"\" size='25'></td></tr>";
echo "<tr class='tab_bg_1'>";
echo "<td colspan='1' class='center'>";
echo "<input type='submit' value=\"" . $LANG['help'][14] . "\" class='submit' >";
echo "</td></tr>";
echo "</table></div>";
//</form>";
Html::closeForm();
}