static function pdfForItem(PluginPdfSimplePDF $pdf, CommonDBTM $item) { global $DB, $CFG_GLPIG; if (!Session::haveRight("contract", "r")) { return false; } $type = $item->getType(); $ID = $item->getField('id'); $con = new Contract(); $query = "SELECT *\n FROM `glpi_contracts_items`\n WHERE `glpi_contracts_items`.`items_id` = '" . $ID . "'\n AND `glpi_contracts_items`.`itemtype` = '" . $type . "'"; $result = $DB->query($query); $number = $DB->numrows($result); $i = $j = 0; $pdf->setColumnsSize(100); if ($number > 0) { $pdf->displayTitle('<b>' . _N('Associated contract', 'Associated contracts', 2) . '</b>'); $pdf->setColumnsSize(19, 19, 19, 16, 11, 16); $pdf->displayTitle(__('Name'), _x('phone', 'Number'), __('Contract type'), __('Supplier'), __('Start date'), __('Initial contract period')); $i++; while ($j < $number) { $cID = $DB->result($result, $j, "contracts_id"); $assocID = $DB->result($result, $j, "id"); if ($con->getFromDB($cID)) { $pdf->displayLine(empty($con->fields["name"]) ? "(" . $con->fields["id"] . ")" : $con->fields["name"], $con->fields["num"], Html::clean(Dropdown::getDropdownName("glpi_contracttypes", $con->fields["contracttypes_id"])), str_replace("<br>", " ", $con->getSuppliersNames()), Html::convDate($con->fields["begin_date"]), sprintf(_n('%d month', '%d months', $con->fields["duration"]), $con->fields["duration"])); } $j++; } } else { $pdf->displayTitle("<b>" . __('No item found') . "</b>"); } $pdf->displaySpace(); }
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="enable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>enable</b> %s?'), _N('selected site page', 'selected site pages', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>disable</b> %s?'), _N('selected site page', 'selected site pages', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected site page', 'selected site pages', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="No, Cancel" class="close"> </span>
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="enable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>enable</b> %s?'), _N('selected canned response', 'selected canned responses', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>disable</b> %s?'), _N('selected canned response', 'selected canned responses', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected canned response', 'selected canned responses', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered, including any associated attachments.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');
<div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm');?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="make_public-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>public</b>?'), _N('selected department', 'selected departments', 2));?> </p> <p class="confirm-action" style="display:none;" id="make_private-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>private</b> (internal)?'), _N('selected department', 'selected departments', 2));?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected department', 'selected departments', 2));?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.');?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');?>" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="<?php echo __('Yes, Do it!');?>" class="confirm"> </span> </p> <div class="clear"></div> </div>
echo __('Delete'); ?> "> </p> </form> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm'); ?> </h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected custom list', 'selected custom lists', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="No, Cancel" class="close"> </span>
} else { $count = count($_POST['ids']); switch (strtolower($_POST['a'])) { case 'delete': $i = 0; foreach ($_POST['ids'] as $k => $v) { if (($t = DynamicForm::lookup($v)) && $t->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected custom form', 'selected custom forms', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %1$d %3$s deleted'), $i, $count, _N('selected custom form', 'selected custom forms', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected custom form', 'selected custom forms', $count)); } break; } } break; } if ($form) { for ($i = 0; isset($_POST["sort-new-{$i}"]); $i++) { if (!$_POST["label-new-{$i}"]) { continue; } $field = DynamicFormField::create(array('sort' => $_POST["sort-new-{$i}"] ? $_POST["sort-new-{$i}"] : ++$max_sort, 'label' => $_POST["label-new-{$i}"], 'type' => $_POST["type-new-{$i}"], 'name' => trim($_POST["name-new-{$i}"]))); $field->setRequirementMode($_POST["visibility-new-{$i}"]); $field->setForm($form); if (in_array($field->get('name'), $names)) {
echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected plugin', 'selected plugins', 2)); ?> </strong></font> <br><br><?php echo __('Configuration for deleted plugins CANNOT be recovered.'); ?> </p> <p class="confirm-action" style="display:none;" id="enable-confirm"> <font color="green"><?php echo sprintf(__('Are you sure you want to <b>enable</b> %s?'), _N('selected plugin', 'selected plugins', 2)); ?> </font> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> <font color="red"><?php echo sprintf(__('Are you sure you want to <b>disable</b> %s?'), _N('selected plugin', 'selected plugins', 2)); ?> </font> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel'); ?> " class="close"> </span>
echo '<div> '.__('Page').':'.$pageNav->getPageLinks().' </div>'; ?> <p class="centered" id="actions"> <input class="button" type="submit" name="delete" value="<?php echo __('Delete'); ?>"> </p> </form> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf( __('Are you sure you want to DELETE %s?'), _N('selected custom list', 'selected custom lists', 2)); ?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="No, Cancel" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="Yes, Do it!" class="confirm"> </span> </p> <div class="clear"></div> </div>
} ?> </table> <div class="clear"></div> <hr> <form method="post" class="user" action="#users/<?php echo $user->getId(); ?>/delete"> <input type="hidden" name="id" value="<?php echo $user->getId(); ?>" /> <?php if (($num=$user->tickets->count())) { echo '<div><input type="checkbox" name="deletetickets" value="1" > <strong>' .sprintf(__('Delete %1$s %2$s %3$s and any associated attachments and data.'), sprintf('<a href="tickets.php?a=search&uid=%d" target="_blank">', $user->getId()), sprintf(_N('one ticket', '%d tickets', $num), $num), '</a>' ) .'</strong></div><hr>'; } ?> <p class="full-width"> <span class="buttons pull-left"> <input type="reset" value="<?php echo __('Reset'); ?>"> <input type="button" name="cancel" class="close" value="<?php echo __('No, Cancel'); ?>"> </span> <span class="buttons pull-right"> <input type="submit" value="<?php echo __('Yes, Delete User'); ?>"> </span> </p>
switch(strtolower($_POST['a'])) { case 'delete': $i=0; foreach($_POST['ids'] as $k=>$v) { if(($t=DynamicList::lookup($v)) && $t->delete()) $i++; } if ($i && $i==$count) $msg = sprintf(__('Successfully deleted %s'), _N('selected custom list', 'selected custom lists', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected custom list', 'selected custom lists', $count)); elseif (!$errors['err']) $errors['err'] = sprintf(__('Unable to delete %s — they may be in use on a custom form'), _N('selected custom list', 'selected custom lists', $count)); break; } } break; } if ($list && $list->allowAdd()) { for ($i=0; isset($_POST["sort-new-$i"]); $i++) { if (!$_POST["value-new-$i"]) continue; $list->addItem(array( 'value' => $_POST["value-new-$i"], 'abbrev' =>$_POST["abbrev-new-$i"], 'sort' => $_POST["sort-new-$i"] ?: ++$max_isort,
} else { $errors['err'] = sprintf(__('Unable to disable %s'), _N('selected team', 'selected teams', $count)); } break; case 'delete': foreach ($_POST['ids'] as $k => $v) { if (($t = Team::lookup($v)) && $t->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected team', 'selected teams', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected team', 'selected teams', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected team', 'selected teams', $count)); } break; default: $errors['err'] = __('Unknown action - get technical help.'); } } break; default: $errors['err'] = __('Unknown action'); break; } } $page = 'teams.inc.php'; $tip_namespace = 'staff.team'; if ($team || $_REQUEST['a'] && !strcasecmp($_REQUEST['a'], 'add')) {
switch(strtolower($_POST['a'])) { case 'delete': $i=0; foreach($_POST['ids'] as $k=>$v) { if(($t=DynamicForm::lookup($v)) && $t->delete()) $i++; } if ($i && $i==$count) $msg = sprintf(__('Successfully deleted %s'), _N('selected custom form', 'selected custom forms', $count)); elseif ($i > 0) $warn = sprintf(__('%1$d of %1$d %3$s deleted'), $i, $count, _N('selected custom form', 'selected custom forms', $count)); elseif (!$errors['err']) $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected custom form', 'selected custom forms', $count)); break; } } break; } if ($form) { for ($i=0; isset($_POST["sort-new-$i"]); $i++) { if (!$_POST["label-new-$i"]) continue; $field = DynamicFormField::create(array( 'sort'=>$_POST["sort-new-$i"] ? $_POST["sort-new-$i"] : ++$max_sort, 'label'=>$_POST["label-new-$i"], 'type'=>$_POST["type-new-$i"], 'name'=>trim($_POST["name-new-$i"]),
?> </form> <?php } ?> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm'); ?> </h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="remove-users-confirm"> <?php echo sprintf(__('Are you sure you want to <b>REMOVE</b> %1$s from <strong>%2$s</strong>?'), _N('selected user', 'selected users', 2), $org->getName()); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel'); ?> " class="close"> </span> <span class="buttons pull-right">
</thead> <tbody> <tr> <th colspan="2"> <em><b><?php echo __('Agent Authentication Settings'); ?></b></em> </th> </tr> <tr><td><?php echo __('Password Expiration Policy'); ?>:</th> <td> <select name="passwd_reset_period"> <option value="0"> — <?php echo __('No expiration'); ?> —</option> <?php for ($i = 1; $i <= 12; $i++) { echo sprintf('<option value="%d" %s>%s</option>', $i,(($config['passwd_reset_period']==$i)?'selected="selected"':''), sprintf(_N('Monthly', 'Every %d months', $i), $i)); } ?> </select> <font class="error"><?php echo $errors['passwd_reset_period']; ?></font> <i class="help-tip icon-question-sign" href="#password_expiration_policy"></i> </td> </tr> <tr><td><?php echo __('Allow Password Resets'); ?>:</th> <td> <input type="checkbox" name="allow_pw_reset" <?php echo $config['allow_pw_reset']?'checked="checked"':''; ?>> <i class="help-tip icon-question-sign" href="#allow_password_resets"></i> </td> </tr> <tr><td><?php echo __('Reset Token Expiration'); ?>:</th> <td>
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="make_public-confirm"> <?php echo sprintf(__('Are you sure want to make %s <b>public</b>?'), _N('selected department', 'selected departments', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="make_private-confirm"> <?php echo sprintf(__('Are you sure want to make %s <b>private</b> (internal)?'), _N('selected department', 'selected departments', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected department', 'selected departments', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');
function authstrike($credentials) { global $ost; $cfg = $ost->getConfig(); $authsession =& $_SESSION['_auth']['staff']; $username = $credentials['username']; $authsession['strikes'] += 1; if ($authsession['strikes'] > $cfg->getStaffMaxLogins()) { $authsession['laststrike'] = time(); $timeout = $cfg->getStaffLoginTimeout() / 60; $alert = _S('Excessive login attempts by an agent?') . "\n" . _S('Username') . ": {$username}\n" . _S('IP') . ": {$_SERVER['REMOTE_ADDR']}\n" . _S('Time') . ": " . date('M j, Y, g:i a T') . "\n\n" . _S('Attempts') . ": {$authsession['strikes']}\n" . _S('Timeout') . ": " . sprintf(_N('%d minute', '%d minutes', $timeout), $timeout) . "\n\n"; $ost->logWarning(sprintf(_S('Excessive login attempts (%s)'), $username), $alert, $cfg->alertONLoginError()); return new AccessDenied(__('Forgot your login info? Contact Admin.')); //Log every other third failed login attempt as a warning. } elseif ($authsession['strikes'] % 3 == 0) { $alert = _S('Username') . ": {$username}\n" . _S('IP') . ": {$_SERVER['REMOTE_ADDR']}\n" . _S('Time') . ": " . date('M j, Y, g:i a T') . "\n\n" . _S('Attempts') . ": {$authsession['strikes']}"; $ost->logWarning(sprintf(_S('Failed agent login attempt (%s)'), $username), $alert, false); } }
$errors['err'] = sprintf(__('Unable to disable %s'), _N('selected help topic', 'selected help topics', $count)); } break; case 'delete': $i = 0; foreach ($_POST['ids'] as $k => $v) { if (($t = Topic::lookup($v)) && $t->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected help topic', 'selected elp topics', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected help topic', 'selected help topics', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected help topic', 'selected help topics', $count)); } break; case 'sort': try { $cfg->setTopicSortMode($_POST['help_topic_sort_mode']); if ($cfg->getTopicSortMode() == 'm') { foreach ($_POST as $k => $v) { if (strpos($k, 'sort-') === 0 && is_numeric($v) && ($t = Topic::lookup(substr($k, 5)))) { $t->setSortOrder($v); } } } $msg = __('Successfully set sorting configuration'); } catch (Exception $ex) { $errors['err'] = __('Unable to set sorting mode');
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="enable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>enable</b> %s?'), _N('selected template set', 'selected template sets', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>disable</b> %s?'), _N('selected template set', 'selected template sets', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected template set', 'selected template sets', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');
} else { $count = count($_POST['ids']); switch (strtolower($_POST['a'])) { case 'delete': $i = 0; foreach ($_POST['ids'] as $k => $v) { if (($t = DynamicList::lookup($v)) && $t->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected custom list', 'selected custom lists', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected custom list', 'selected custom lists', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s — they may be in use on a custom form'), _N('selected custom list', 'selected custom lists', $count)); } break; } } break; } if ($list && $list->allowAdd()) { for ($i = 0; isset($_POST["sort-new-{$i}"]); $i++) { if (!$_POST["value-new-{$i}"]) { continue; } $list->addItem(array('value' => $_POST["value-new-{$i}"], 'abbrev' => $_POST["abbrev-new-{$i}"], 'sort' => $_POST["sort-new-{$i}"] ?: ++$max_isort), $errors); } } if ($form) {
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="enable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>enable</b> %s?'), _N('selected ban rule', 'selected ban rules', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="disable-confirm"> <?php echo sprintf(__('Are you sure you want to <b>disable</b> %s?'), _N('selected ban rule', 'selected ban rules', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected ban rule', 'selected ban rules', 2)); ?> </strong></font> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel'); ?> " class="close"> </span>
<option value=0 selected><?php echo __('Never Purge Logs'); ?> </option> <?php for ($i = 1; $i <= 12; $i++) { ?> <option <?php echo $config['log_graceperiod'] == $i ? 'selected="selected"' : ''; ?> value="<?php echo $i; ?> "> <?php echo sprintf(_N('After %d month', 'After %d months', $i), $i); ?> </option> <?php } ?> </select> <i class="help-tip icon-question-sign" href="#purge_logs"></i> </td> </tr> <tr> <td width="180"><?php echo __('Default Name Formatting'); ?> :</td> <td>
list($depts) = db_fetch_row(db_query($sql)); if ($depts > 0) { $errors['err'] = __('One or more of the selected emails is being used by a department. Remove association first!'); } elseif (!strcasecmp($_POST['a'], 'delete')) { $i = 0; foreach ($_POST['ids'] as $k => $v) { if ($v != $cfg->getDefaultEmailId() && ($e = Email::lookup($v)) && $e->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected email', 'selected emails', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected email', 'selected emails', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected email', 'selected emails', $count)); } } else { $errors['err'] = __('Unknown action - get technical help.'); } } break; default: $errors['err'] = __('Unknown action'); break; } } $page = 'emails.inc.php'; $tip_namespace = 'emails.email'; if ($email || $_REQUEST['a'] && !strcasecmp($_REQUEST['a'], 'add')) { $page = 'email.inc.php';
</form> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm');?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="make_public-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>public</b>?'), _N('selected category', 'selected categories', 2));?> </p> <p class="confirm-action" style="display:none;" id="make_private-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>private</b> (internal)?'), _N('selected category', 'selected categories', 2));?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected category', 'selected categories', 2));?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered, including any associated FAQs.'); ?> </p> <div><?php echo __('Please confirm to continue.');?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');?>" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="<?php echo __('Yes, Do it!');?>" class="confirm"> </span> </p> <div class="clear"></div> </div>
?> <p class="centered" id="actions"> <input class="button" type="submit" name="delete" value="<?php echo __('Delete Email(s)');?>" > </p> <?php endif; ?> </form> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm');?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected email', 'selected emails', 2)) ;?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.');?> </p> <div><?php echo __('Please confirm to continue.');?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');?>" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="<?php echo __('Yes, Do it!');?>" class="confirm"> </span> </p> <div class="clear"></div> </div>
echo Format::htmlchars($ticket->getName()); ?> </span></a> <?php if ($user) { echo sprintf(' <a href="tickets.php?a=search&uid=%d" title="%s" data-dropdown="#action-dropdown-stats">(<b>%d</b>)</a>', urlencode($user->getId()), __('Related Tickets'), $user->getNumTickets()); ?> <div id="action-dropdown-stats" class="action-dropdown anchor-right"> <ul> <?php if ($open = $user->getNumOpenTickets()) { echo sprintf('<li><a href="tickets.php?a=search&status=open&uid=%s"><i class="icon-folder-open-alt icon-fixed-width"></i> %s</a></li>', $user->getId(), sprintf(_N('%d Open Ticket', '%d Open Tickets', $open), $open)); } if ($closed = $user->getNumClosedTickets()) { echo sprintf('<li><a href="tickets.php?a=search&status=closed&uid=%d"><i class="icon-folder-close-alt icon-fixed-width"></i> %s</a></li>', $user->getId(), sprintf(_N('%d Closed Ticket', '%d Closed Tickets', $closed), $closed)); } ?> <li><a href="tickets.php?a=search&uid=<?php echo $ticket->getOwnerId(); ?> "><i class="icon-double-angle-right icon-fixed-width"></i> <?php echo __('All Tickets'); ?> </a></li> <li><a href="users.php?id=<?php echo $user->getId(); ?> "><i class="icon-user icon-fixed-width"></i> <?php echo __('Manage User');
} else { $errors['err'] = sprintf(__('Unable to disable %s'), _N('selected group', 'selected groups', $count)); } break; case 'delete': foreach ($_POST['ids'] as $k => $v) { if (($g = Group::lookup($v)) && $g->delete()) { $i++; } } if ($i && $i == $count) { $msg = sprintf(__('Successfully deleted %s'), _N('selected group', 'selected groups', $count)); } elseif ($i > 0) { $warn = sprintf(__('%1$d of %2$d %3$s deleted'), $i, $count, _N('selected group', 'selected groups', $count)); } elseif (!$errors['err']) { $errors['err'] = sprintf(__('Unable to delete %s'), _N('selected group', 'selected groups', $count)); } break; default: $errors['err'] = __('Unknown action - get technical help.'); } } break; default: $errors['err'] = __('Unknown action'); break; } } $page = 'groups.inc.php'; $tip_namespace = 'staff.groups'; if ($group || $_REQUEST['a'] && !strcasecmp($_REQUEST['a'], 'add')) {
?> <p class="centered" id="actions"> <input class="button" type="submit" name="delete" value="<?php echo __('Delete Selected Entries');?>"> </p> <?php endif; ?> </form> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm');?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected log entry', 'selected log entries', 2));?></strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered.');?> </p> <div><?php echo __('Please confirm to continue.');?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');?>" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="<?php echo __('Yes, Do it!');?>" class="confirm"> </span> </p> <div class="clear"></div> </div>
default: $errors['err'] = __('Unknown action - get technical help.'); } if (!$errors['err'] && !$count) { $errors['err'] = __('Unable to manage any of the selected end users'); } elseif ($_POST['count'] && $count != $_POST['count']) { $warn = __('Not all selected items were updated'); } elseif ($count) { $msg = __('Successfully managed selected end users'); } } break; case 'import-users': $status = User::importFromPost($_FILES['import'] ?: $_POST['pasted']); if (is_numeric($status)) { $msg = sprintf(__('Successfully imported %1$d %2$s.'), $status, _N('end user', 'end users', $status)); } else { $errors['err'] = $status; } break; default: $errors['err'] = __('Unknown action'); break; } } elseif ($_REQUEST['a'] == 'export') { require_once INCLUDE_DIR . 'class.export.php'; $ts = strftime('%Y%m%d'); if (!($token = $_REQUEST['qh'])) { $errors['err'] = __('Query token required'); } elseif (!($query = $_SESSION['users_qs_' . $token])) { $errors['err'] = __('Query token not found');
</p> <?php } ?> </form> <?php } ?> <div style="display:none;" class="dialog" id="confirm-action"> <h3><?php echo __('Please Confirm'); ?></h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="remove-users-confirm"> <?php echo sprintf(__( 'Are you sure you want to <b>REMOVE</b> %1$s from <strong>%2$s</strong>?'), _N('selected user', 'selected users', 2), $org->getName()); ?> </p> <div><?php echo __('Please confirm to continue.'); ?></div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel'); ?>" class="close"> </span> <span class="buttons pull-right"> <input type="button" value="<?php echo __('Yes, Do it!'); ?>" class="confirm"> </span> </p> <div class="clear"></div> </div>
</h3> <a class="close" href=""><i class="icon-remove-circle"></i></a> <hr/> <p class="confirm-action" style="display:none;" id="make_public-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>public</b>?'), _N('selected category', 'selected categories', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="make_private-confirm"> <?php echo sprintf(__('Are you sure you want to make %s <b>private</b> (internal)?'), _N('selected category', 'selected categories', 2)); ?> </p> <p class="confirm-action" style="display:none;" id="delete-confirm"> <font color="red"><strong><?php echo sprintf(__('Are you sure you want to DELETE %s?'), _N('selected category', 'selected categories', 2)); ?> </strong></font> <br><br><?php echo __('Deleted data CANNOT be recovered, including any associated FAQs.'); ?> </p> <div><?php echo __('Please confirm to continue.'); ?> </div> <hr style="margin-top:1em"/> <p class="full-width"> <span class="buttons pull-left"> <input type="button" value="<?php echo __('No, Cancel');