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


PHP PHPWS_Text::linkAddress方法代码示例

本文整理汇总了PHP中PHPWS_Text::linkAddress方法的典型用法代码示例。如果您正苦于以下问题:PHP PHPWS_Text::linkAddress方法的具体用法?PHP PHPWS_Text::linkAddress怎么用?PHP PHPWS_Text::linkAddress使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PHPWS_Text的用法示例。


在下文中一共展示了PHPWS_Text::linkAddress方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getOptions

 public function getOptions()
 {
     if (!$this->reported) {
         $opt[] = sprintf('<a style="cursor : pointer" class="message" id="%s">%s</a>', $this->from_user_id, \Icon::show('undo', 'Reply to contact'));
         $opt[] = sprintf('<a style="cursor:pointer" class="report" id="%s">%s</a>', $this->id, \Icon::show('warning', 'Report'));
         $opt[] = javascript('confirm', array('question' => 'Are you sure you want to delete this message?', 'address' => \PHPWS_Text::linkAddress('properties', array('rop' => 'delete_message', 'id' => $this->id)), 'link' => \Icon::show('delete'), 'title' => 'Delete message'));
         return implode('', $opt);
     } else {
         return null;
     }
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:11,代码来源:Message.php

示例2: rowTags

 public function rowTags()
 {
     $vars['reason_id'] = $this->id;
     $vars['aop'] = 'edit_reason';
     $links[] = PHPWS_Text::secureLink(Icon::show('edit'), 'checkin', $vars);
     $vars['aop'] = 'delete_reason';
     $js['question'] = dgettext('confirm', 'Are you sure you want to delete this reason?.');
     $js['address'] = PHPWS_Text::linkAddress('checkin', $vars, true);
     $js['link'] = Icon::show('delete');
     $links[] = javascript('confirm', $js);
     $tpl['ACTION'] = implode('', $links);
     return $tpl;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:13,代码来源:Reasons.php

示例3: javascript

 * See docs/AUTHORS and docs/COPYRIGHT for relevant info.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation; either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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.
 *
 *
 * @version $Id$
 * @author Matthew McNaney <mcnaney at gmail dot com>
 * @package
 * @license http://opensource.org/licenses/gpl-3.0.html
 */
javascript('jquery');
javascript('jquery_ui');
if (!empty($data['is_contact'])) {
    $cmd = 'cop';
} else {
    $cmd = 'aop';
}
$ar[$cmd] = 'photo_form';
if (isset($data['view'])) {
    $ar['v'] = 1;
}
$data['form_url'] = \PHPWS_Text::linkAddress('properties', $ar, true, false, false);
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:30,代码来源:default.php

示例4: cpanel

 public static function cpanel()
 {
     PHPWS_Core::initModClass('controlpanel', 'Panel.php');
     $link = PHPWS_Text::linkAddress('analytics', null, false, false, true, false);
     $tabs['list'] = array('title' => dgettext('analytics', 'List Trackers'), 'link' => $link);
     $tabs['new'] = array('title' => dgettext('analytics', 'New Tracker'), 'link' => $link);
     $panel = new PHPWS_Panel('analyticsPanel');
     $panel->enableSecure();
     $panel->quickSetTabs($tabs);
     $panel->setModule('analytics');
     $panel->setPanel('panel.tpl');
     return $panel;
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:13,代码来源:Analytics.php

示例5: random

 /**
  * Gets random page from the database
  *
  * @author Greg Meiste <greg.meiste+github@gmail.com>
  */
 function random()
 {
     $db = new PHPWS_DB('wiki_pages');
     $db->addOrder('random');
     $db->setLimit(1);
     $db->addColumn('title');
     $result = $db->select('col');
     if (!PHPWS_Error::logIfError($result) && $result != NULL) {
         PHPWS_Core::reroute(PHPWS_Text::linkAddress('wiki', array('page' => $result[0])));
     }
     PHPWS_Core::reroute(PHPWS_Text::linkAddress('wiki'));
 }
开发者ID:Jopperi,项目名称:wiki,代码行数:17,代码来源:WikiManager.php

示例6: getManagerIcon

 public function getManagerIcon($fmanager)
 {
     $force = $fmanager->force_resize ? 'true' : 'false';
     if ($fmanager->max_width < $this->width || $fmanager->max_height < $this->height) {
         return sprintf('<a href="#" onclick="oversized_media(%s, %s); return false">%s</a>', $this->id, $force, $this->getThumbnail());
     } else {
         $vars = $fmanager->linkInfo(false);
         $vars['fop'] = 'pick_file';
         $vars['file_type'] = FC_MEDIA;
         $vars['id'] = $this->id;
         $link = PHPWS_Text::linkAddress('filecabinet', $vars, true);
         return sprintf('<a href="%s">%s</a>', $link, $this->getThumbnail());
     }
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:14,代码来源:Multimedia.php

示例7: getPanel

 public function getPanel()
 {
     $panel = new PHPWS_Panel('calendar');
     $vars['aop'] = 'schedules';
     $tabs['schedules'] = array('title' => dgettext('calendar', 'Schedules'), 'link' => PHPWS_Text::linkAddress('calendar', $vars));
     if (Current_User::allow('calendar', 'settings')) {
         $vars['aop'] = 'settings';
         $tabs['settings'] = array('title' => dgettext('calendar', 'Settings'), 'link' => PHPWS_Text::linkAddress('calendar', $vars));
     }
     if (Current_User::isUnrestricted('calendar') && Current_User::allow('calendar', 'edit_public')) {
         $vars['aop'] = 'approval';
         $db = new PHPWS_DB('calendar_suggestions');
         $count = $db->count();
         if (PHPWS_Error::isError($count)) {
             PHPWS_Error::log($count);
             $count = 0;
         }
         $tabs['approval'] = array('title' => sprintf(dgettext('calendar', 'Approval (%s)'), $count), 'link' => PHPWS_Text::linkAddress('calendar', $vars));
     }
     $panel->quickSetTabs($tabs);
     return $panel;
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:22,代码来源:Admin.php

示例8: listModules

 public static function listModules($type)
 {
     Layout::addStyle('boost');
     $allow_update = true;
     $core_update_needed = false;
     $dir_content = array();
     if (!PHPWS_Boost::checkDirectories($dir_content)) {
         $tpl['DIRECTORIES'] = implode('<br />', $dir_content);
         $allow_update = false;
     }
     $core_mods = PHPWS_Core::coreModList();
     $installed_mods = PHPWS_Core::installModList();
     $dir_mods = PHPWS_Boost::getAllMods();
     if ($type == 'core_mods') {
         $allowUninstall = false;
         $modList = $core_mods;
         $core_file = new PHPWS_Module('core');
         $core_db = new PHPWS_Module('core', false);
         $template['TITLE'] = $core_db->proper_name;
         $template['VERSION'] = $core_db->version;
         if (isset($_SESSION['Boost_Needs_Update']['core'])) {
             $link_title = $_SESSION['Boost_Needs_Update']['core'];
             if (version_compare($core_file->version, $_SESSION['Boost_Needs_Update']['core'], '<')) {
                 $link_title = sprintf(dgettext('boost', '%s - New'), $link_title);
             }
         } else {
             $link_title = dgettext('boost', 'Check');
         }
         if ($core_file->isAbout()) {
             $address = PHPWS_Text::linkAddress('boost', array('action' => 'aboutView', 'aboutmod' => $core_file->title), true);
             $aboutView = array('label' => dgettext('boost', 'About'), 'address' => $address);
             $template['ABOUT'] = Layout::getJavascript('open_window', $aboutView);
         }
         $link_command['opmod'] = 'core';
         $link_command['action'] = 'check';
         if (ini_get('allow_url_fopen')) {
             $template['LATEST'] = PHPWS_Text::secureLink($link_title, 'boost', $link_command);
         } else {
             $template['LATEST'] = dgettext('boost', 'Check disabled');
         }
         if (version_compare($core_db->version, $core_file->version, '<')) {
             if ($core_file->checkDependency()) {
                 if ($allow_update) {
                     $link_command['action'] = 'update_core';
                     $core_links[] = PHPWS_Text::secureLink(dgettext('boost', 'Update'), 'boost', $link_command);
                 } else {
                     $core_links[] = dgettext('boost', 'Update');
                 }
                 $tpl['WARNING'] = dgettext('boost', 'The Core requires updating! You should do so before any modules.');
                 $core_update_needed = true;
             } else {
                 $link_command['action'] = 'show_dependency';
                 $core_links[] = PHPWS_Text::secureLink(dgettext('boost', 'Missing dependency'), 'boost', $link_command);
             }
             $template['VERSION'] = sprintf('%s &gt; %s', $core_db->version, $core_file->version);
             $template['COMMAND'] = implode(' | ', $core_links);
         } else {
             $template['COMMAND'] = dgettext('boost', 'None');
         }
         $template['ROW'] = 1;
         $tpl['mod-row'][] = $template;
     } else {
         $allowUninstall = true;
         $modList = array_diff($dir_mods, $core_mods);
     }
     $tpl['TITLE_LABEL'] = dgettext('boost', 'Module Title');
     $tpl['COMMAND_LABEL'] = dgettext('boost', 'Commands');
     $tpl['ABOUT_LABEL'] = dgettext('boost', 'More information');
     $tpl['VERSION_LABEL'] = dgettext('boost', 'Current version');
     if ($type == 'core_mods' && Current_User::isDeity() && DEITIES_CAN_UNINSTALL) {
         $tpl['WARNING'] = dgettext('boost', 'WARNING: Only deities can uninstall core modules. Doing so may corrupt your installation!');
     }
     if (empty($modList)) {
         return dgettext('boost', 'No modules available.');
     }
     sort($modList);
     $count = 1;
     foreach ($modList as $title) {
         $links = array();
         $template = $link_command = NULL;
         $link_command['opmod'] = $title;
         $mod = new PHPWS_Module($title);
         if (!$mod->isFullMod()) {
             continue;
         }
         $proper_name = $mod->getProperName();
         if (!isset($proper_name)) {
             $proper_name = $title;
         }
         $template['VERSION'] = $mod->version;
         $template['TITLE'] = $proper_name;
         $template['ROW'] = $count % 2 + 1;
         $version_check = $mod->getVersionHttp();
         if (isset($version_check)) {
             if (isset($_SESSION['Boost_Needs_Update'][$mod->title])) {
                 $link_title = $_SESSION['Boost_Needs_Update'][$mod->title];
                 if (version_compare($mod->version, $_SESSION['Boost_Needs_Update'][$mod->title], '<')) {
                     $link_title = sprintf(dgettext('boost', '%s - New'), $link_title);
                 }
             } else {
//.........这里部分代码省略.........
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:101,代码来源:Form.php

示例9: embedLink

 /**
  * @deprecated
  * @param type $button
  * @return type
  */
 public function embedLink($button = false)
 {
     $vars['address'] = PHPWS_Text::linkAddress('filecabinet', array('mop' => 'edit_embed', 'folder_id' => $this->id), true);
     $vars['width'] = 400;
     $vars['height'] = 200;
     $vars['title'] = $vars['label'] = dgettext('filecabinet', 'Add embedded');
     if ($button) {
         $vars['type'] = 'button';
     }
     return javascript('open_window', $vars);
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:16,代码来源:Folder.php

示例10: options

 private function options()
 {
     $opt[] = \PHPWS_Text::moduleLink('Create/Edit request', 'properties', array('rop' => 'edit'));
     $opt[] = javascript('confirm', array('question' => 'Are you sure you want to clear your roommate request?', 'address' => \PHPWS_Text::linkAddress('properties', array('rop' => 'clear')), 'link' => 'Clear my request', 'title' => 'Clear my request'));
     $opt[] = \PHPWS_Text::moduleLink('Extend my deadline', 'properties', array('rop' => 'timeout'));
     $db = new \PHPWS_DB('prop_messages');
     $db->addWhere('to_user_id', \Current_User::getId());
     $db->addOrder('date_sent desc');
     $db->addWhere('hidden', 0);
     $db->addColumn('id');
     $messages = $db->select('col');
     if (\PHPWS_Error::isError($messages)) {
         \PHPWS_Error::log($messages);
     } else {
         $opt[] = \PHPWS_Text::moduleLink('Messages (' . count($messages) . ')', 'properties', array('rop' => 'read_messages'));
     }
     return implode(' | ', $opt);
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:18,代码来源:Roommate_User.php

示例11: display

 public static function display()
 {
     PHPWS_Core::initModClass('intern', 'Internship.php');
     PHPWS_Core::initModClass('intern', 'InternshipFactory.php');
     PHPWS_Core::initModClass('intern', 'Intern_Document.php');
     PHPWS_Core::initModClass('intern', 'Intern_Folder.php');
     PHPWS_Core::initModClass('intern', 'Agency.php');
     PHPWS_Core::initModClass('intern', 'InternshipFormView.php');
     PHPWS_Core::initModClass('intern', 'EditInternshipFormView.php');
     PHPWS_Core::initModClass('intern', 'Term.php');
     PHPWS_Core::initModClass('intern', 'Department.php');
     PHPWS_Core::initModClass('intern', 'Major.php');
     PHPWS_Core::initModClass('intern', 'GradProgram.php');
     PHPWS_Core::initModClass('intern', 'Subject.php');
     $tpl = array();
     if (isset($_REQUEST['internship_id'])) {
         /* Attempting to edit internship */
         try {
             $i = InternshipFactory::getInternshipById($_REQUEST['internship_id']);
         } catch (InternshipNotFoundException $e) {
             NQ::simple('intern', INTERN_ERROR, 'Could not locate an internship with the given ID.');
             return;
         }
         $internshipForm = new EditInternshipFormView('Edit Internship', $i);
         $internshipForm->buildInternshipForm();
         $internshipForm->plugInternship();
         $tpl['TITLE'] = 'Edit Internship';
         $form = $internshipForm->getForm();
         /*** 'Generate Contract' Button ***/
         $tpl['PDF'] = PHPWS_Text::linkAddress('intern', array('action' => 'pdf', 'id' => $i->id));
         /*** Document List ***/
         $docs = $i->getDocuments();
         if (!is_null($docs)) {
             foreach ($docs as $doc) {
                 $tpl['docs'][] = array('DOWNLOAD' => $doc->getDownloadLink('blah'), 'DELETE' => $doc->getDeleteLink());
             }
         }
         $folder = new Intern_Folder(Intern_Document::getFolderId());
         $tpl['UPLOAD_DOC'] = $folder->documentUpload($i->id);
         $wfState = $i->getWorkflowState();
         if (($wfState instanceof SigAuthReadyState || $wfState instanceof SigAuthApprovedState || $wfState instanceof DeanApprovedState || $wfState instanceof RegisteredState) && $docs < 1) {
             NQ::simple('intern', INTERN_WARNING, "No documents have been uploaded yet. Usually a copy of the signed contract document should be uploaded.");
         }
         /******************
          * Change History *
          */
         if (!is_null($i->id)) {
             PHPWS_Core::initModClass('intern', 'ChangeHistoryView.php');
             $historyView = new ChangeHistoryView($i);
             $tpl['CHANGE_LOG'] = $historyView->show();
         }
         // Show a warning if in SigAuthReadyState, is international, and not OIED approved
         if ($i->getWorkflowState() instanceof SigAuthReadyState && $i->isInternational() && !$i->isOiedCertified()) {
             NQ::simple('intern', INTERN_WARNING, 'This internship can not be approved by the Signature Authority bearer until the internship is certified by the Office of International Education and Development.');
         }
         // Show a warning if in DeanApproved state and is distance_ed campus
         if ($i->getWorkflowState() == 'DeanApprovedState' && $i->isDistanceEd()) {
             NQ::simple('intern', INTERN_WARNING, 'This internship must be registered by Distance Education.');
         }
         // Sanity check cource section #
         if ($i->isDistanceEd() && ($i->getCourseSection() < 300 || $i->getCourseSection() > 399)) {
             NQ::simple('intern', INTERN_WARNING, "This is a distance ed internship, so the course section number should be between 300 and 399.");
         }
         // Sanity check distance ed radio
         if (!$i->isDistanceEd() && ($i->getCourseSection() > 300 && $i->getCourseSection() < 400)) {
             NQ::simple('intern', INTERN_WARNING, "The course section number you entered looks like a distance ed course. Be sure to check the Distance Ed option, or double check the section number.");
         }
         PHPWS_Core::initModClass('intern', 'EmergencyContactFormView.php');
         $emgContactDialog = new EmergencyContactFormView($i);
         $tpl['ADD_EMERGENCY_CONTACT'] = '<button type="button" class="btn btn-default btn-sm" id="add-ec-button"><i class="fa fa-plus"></i> Add Contact</button>';
         $tpl['EMERGENCY_CONTACT_DIALOG'] = $emgContactDialog->getHtml();
     } else {
         // Attempting to create a new internship
         // Check permissions
         if (!Current_User::allow('intern', 'create_internship')) {
             NQ::simple('intern', INTERN_ERROR, 'You do not have permission to create new internships.');
             NQ::close();
             PHPWS_Core::home();
         }
         $tpl['TITLE'] = 'Add Internship';
         $internshipForm = new InternshipFormView('Add Internship');
         $internshipForm->buildInternshipForm();
         $tpl['AUTOFOCUS'] = 'autofocus';
         /* Show form with empty fields. */
         $form = $internshipForm->getForm();
         // Show a disabled button in document list if we are adding an internship.
         $tpl['UPLOAD_DOC'] = '<div title="Please save this internship first."><button id="doc-upload-btn" class="btn btn-default btn-sm" title="Please save this internship first." disabled="disabled"><i class="fa fa-upload"></i> Add document</button></div>';
         // Show a disabled emergency contact button
         $tpl['ADD_EMERGENCY_CONTACT'] = '<div title="Please save this internship first."><button class="btn btn-default btn-sm" id="add-ec-button" disabled="disabled" data-toggle="tooltip" title="first tooltip"><i class="fa fa-plus"></i> Add Contact</button></div>';
     }
     /*
      * If 'missing' is set then we have been redirected
      * back to the form because the user didn't type in something and
      * somehow got past the javascript.
      */
     if (isset($_REQUEST['missing'])) {
         $missing = explode(' ', $_REQUEST['missing']);
         //javascriptMod('intern', 'missing');
         /*
          * Set classes on field we are missing.
//.........这里部分代码省略.........
开发者ID:jeffrafter,项目名称:InternshipInventory,代码行数:101,代码来源:InternshipUI.php

示例12: getPager


//.........这里部分代码省略.........
                 $orderByList[] = "fuzzy.t{$i}_lev";
                 $orderByList[] = "fuzzy.t{$i}_metalev";
             }
             $pager->db->addOrder($orderByList);
             $pager->db->addColumnRaw('fuzzy.*');
             $pager->db->addSubSelect($fuzzyDb, 'fuzzy');
         }
     }
     $pager->db->addJoin('LEFT OUTER', 'fuzzy', 'intern_faculty', 'faculty_id', 'id');
     $pager->db->addJOIN('LEFT OUTER', 'fuzzy', 'intern_department', 'department_id', 'id');
     // Student level
     if (isset($level)) {
         if ($level == Student::UNDERGRAD) {
             $pager->addWhere('level', Student::UNDERGRAD);
         } else {
             if ($level == Student::GRADUATE || $level == Student::DOCTORAL || $level == Student::POSTDOC) {
                 $pager->addWhere('level', Student::GRADUATE, null, 'OR', 'grad_level');
                 $pager->addWhere('level', Student::DOCTORAL, null, 'OR', 'grad_level');
                 $pager->addWhere('level', Student::POSTDOC, null, 'OR', 'grad_level');
             }
         }
         // Major
         if ($level == 'ugrad' && isset($ugradMajor) && $ugradMajor != -1) {
             // Undergrad major
             $pager->addWhere('major_code', $ugradMajor);
         } else {
             if ($level == 'grad' && isset($gradProg) && $gradProg != -1) {
                 // Graduate program
                 $pager->addWhere('major_code', $gradProg);
             }
         }
     }
     // Experience type
     if (!is_null($type)) {
         $pager->addWhere('experience_type', $type);
     }
     // Course Info
     if (!is_null($courseSubject) && $courseSubject != '-1') {
         $pager->addWhere('course_subj', $courseSubject);
     }
     if (!is_null($courseNum) && $courseNum != '') {
         $pager->addWhere('course_no', $courseNum);
     }
     if (!is_null($courseSect) && $courseSect != '') {
         $pager->addWhere('course_sect', $courseSect);
     }
     // Location
     if (!is_null($loc)) {
         if ($loc == 'domestic') {
             $pager->addWhere('domestic', 1);
         } else {
             if ($loc == 'internat') {
                 $pager->addWhere('international', 1);
             }
         }
     }
     // Campus
     if (isset($campus) && $campus != '-1') {
         $pager->addWhere('campus', $campus);
     }
     // Domestic state
     if (!is_null($state) && $state != '-1') {
         $pager->addWhere('loc_state', "%{$state}%", 'ILIKE');
     }
     // International
     if (!is_null($country) && $country != '-1') {
         $pager->addWhere('loc_country', $country);
     }
     // Workflow state/status
     if (isset($workflowState)) {
         foreach ($workflowState as $s) {
             $path = explode('\\', $s);
             $pager->db->addWhere('state', $path[2], '=', 'OR', 'workflow_group');
         }
     }
     //var_dump($pager);exit;
     //$pager->db->setTestMode();
     //$pager->db->select();
     /**
      * * Sort Headers **
      */
     $pager->setAutoSort(false);
     $pager->addSortHeader('term', 'Term');
     // $pager->joinResult('student_id', 'intern_student', 'id', 'last_name', 'student_last_name');
     $pager->addSortHeader('last_name', 'Student\'s Name');
     // $pager->joinResult('student_id', 'intern_student', 'id', 'banner');
     $pager->addSortHeader('banner', 'Banner ID');
     $pager->joinResult('department_id', 'intern_department', 'id', 'name');
     $pager->addSortHeader('intern_department.name', 'Department Name');
     //$pager->joinResult('faculty_id', 'intern_faculty', 'id', 'last_name', 'faculty_last_name');
     $pager->addSortHeader('intern_faculty.last_name', 'Instructor');
     $pager->addSortHeader('state', 'Status');
     /**
      * *** Other Page Tags *****
      */
     $pageTags = array();
     $pageTags['BACK_LINK_URI'] = \PHPWS_Text::linkAddress('intern', array('action' => 'search'));
     $pager->addPageTags($pageTags);
     return $pager;
 }
开发者ID:jlbooker,项目名称:InternshipInventory,代码行数:101,代码来源:ResultsUI.php

示例13: view

 public function view()
 {
     $tpl['DATE_SENT'] = $this->getDate();
     $tpl['MESSAGE'] = nl2br($this->message);
     $tpl['REASON'] = $this->getReason();
     $reporter = new \PHPWS_User($this->reporter_id);
     $offender = new \PHPWS_User($this->offender_id);
     $tpl['REPORTER'] = $reporter->getUsername();
     $tpl['OFFENDER'] = $offender->getUsername();
     $vars['QUESTION'] = "Ignoring this report will permanently delete it. Be sure you have dealt with those involved before removing it.\nAre you sure you want to ignore this report?";
     $vars['ADDRESS'] = \PHPWS_Text::linkAddress('properties', array('aop' => 'ignore_report', 'id' => $this->id), true);
     $vars['LINK'] = 'Ignore';
     $tpl['IGNORE'] = javascript('confirm', $vars);
     if (!$this->block) {
         $vars['QUESTION'] = "Ignoring this report will permanently delete it. Be sure you have dealt with those involved before removing it.\nAre you sure you want to ignore this report?";
         $vars['ADDRESS'] = \PHPWS_Text::linkAddress('properties', array('aop' => 'ignore_report', 'id' => $this->id), true);
         $vars['LINK'] = 'Ignore';
         $links[] = javascript('confirm', $vars);
         $vars['QUESTION'] = "Blocking a report will prevent the offender from logging in. Are you sure you want to do this?";
         $vars['ADDRESS'] = \PHPWS_Text::linkAddress('properties', array('aop' => 'block_report', 'id' => $this->id), true);
         $vars['LINK'] = 'Block';
         $links[] = javascript('confirm', $vars);
     } else {
         $vars['QUESTION'] = 'Removing this block will allow ' . $offender->getUsername() . ' access to roommates again. Are you sure you want to do this?';
         $vars['ADDRESS'] = \PHPWS_Text::linkAddress('properties', array('aop' => 'ignore_report', 'id' => $this->id), true);
         $vars['LINK'] = 'Remove Block';
         $links[] = javascript('confirm', $vars);
     }
     $links[] = '<a style="cursor : pointer" id="close-view">Close</a>';
     if ($this->block) {
         $tpl['BLOCK_REASON'] = $this->block_reason;
     }
     $tpl['LINKS'] = implode(' | ', $links);
     return \PHPWS_Template::process($tpl, 'properties', 'report_view.tpl');
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:35,代码来源:Report.php

示例14: classifyFileList

 /**
  * This forms lets admins pick files uploaded to the server for sorting on the site.
  */
 public function classifyFileList()
 {
     $this->cabinet->title = dgettext('filecabinet', 'Classify files');
     $classify_dir = $this->cabinet->getClassifyDir();
     if (empty($classify_dir) || !is_dir($classify_dir)) {
         $this->cabinet->content = dgettext('filecabinet', 'Unable to locate the classify directory. Please check your File Cabinet settings, configuration file and directory permissions.');
         return;
     }
     $allowed_file_types = $this->cabinet->getAllowedTypes();
     $result = PHPWS_File::readDirectory($classify_dir, false, true);
     if (empty($result)) {
         $this->cabinet->content = dgettext('filecabinet', 'The incoming file directory is currently empty.');
         return;
     }
     sort($result);
     if (PHPWS_Error::logIfError($result)) {
         $this->cabinet->content = dgettext('filecabinet', 'An error occurred when trying to read your incoming file directory.');
         return;
     }
     $form = new PHPWS_Form('classify_file_list');
     $form->addHidden('aop', 'classify_action');
     $form->addHidden('module', 'filecabinet');
     $image_folders = Cabinet::listFolders(IMAGE_FOLDER, true);
     if (!empty($image_folders)) {
         $form->addSelect('image_folders', $image_folders);
         $form->addSubmit('image_force', dgettext('filecabinet', 'Put all checked images here'));
     }
     $document_folders = Cabinet::listFolders(DOCUMENT_FOLDER, true);
     if (!empty($document_folders)) {
         $form->addSelect('document_folders', $document_folders);
         $form->addSubmit('document_force', dgettext('filecabinet', 'Put all checked documents here'));
     }
     $media_folders = Cabinet::listFolders(MULTIMEDIA_FOLDER, true);
     if (!empty($media_folders)) {
         $form->addSelect('media_folders', $media_folders);
         $form->addSubmit('media_force', dgettext('filecabinet', 'Put all checked media here'));
     }
     $options['classify'] = dgettext('filecabinet', '-- Pick option --');
     $options['classify_file'] = dgettext('filecabinet', 'Classify checked');
     $options['delete_incoming'] = dgettext('filecabinet', 'Delete checked');
     $form->addSelect('process_checked', $options);
     $tpl = $form->getTemplate();
     $js_vars['value'] = dgettext('filecabinet', 'Go');
     $js_vars['select_id'] = 'classify_file_list_aop';
     $js_vars['action_match'] = 'delete_incoming';
     $js_vars['message'] = dgettext('filecabinet', 'Are you sure you wish to delete these files?');
     $tpl['SUBMIT'] = javascript('select_confirm', $js_vars);
     $tpl['CHECK_ALL'] = javascript('check_all', array('checkbox_name' => 'file_list'));
     foreach ($result as $file) {
         $links = array();
         $id = preg_replace('/\\W/', '-', $file);
         $rowtpl['FILE_NAME'] = sprintf('<label for="%s">%s</label>', $id, $file);
         $rowtpl['FILE_TYPE'] = PHPWS_File::getVbType($file);
         $vars['file'] = urlencode($file);
         if (!$this->cabinet->fileTypeAllowed($file)) {
             $rowtpl['ERROR'] = ' class="error"';
             $rowtpl['MESSAGE'] = dgettext('filecabinet', 'File type not allowed');
         } elseif (!PHPWS_File::checkMimeType($classify_dir . $file)) {
             if (!is_readable($classify_dir . $file)) {
                 $rowtpl['ERROR'] = ' class="error"';
                 $rowtpl['MESSAGE'] = dgettext('filecabinet', 'File is unreadable');
             } else {
                 $rowtpl['ERROR'] = ' class="error"';
                 $rowtpl['MESSAGE'] = dgettext('filecabinet', 'Unknown or mismatched mime type');
             }
         } else {
             $rowtpl['CHECK'] = sprintf('<input type="checkbox" id="%s" name="file_list[]" value="%s" />', $id, $file);
             $rowtpl['ERROR'] = $rowtpl['MESSAGE'] = null;
             $vars['aop'] = 'classify_file';
             $links[] = PHPWS_Text::secureLink(dgettext('filecabinet', 'Classify'), 'filecabinet', $vars);
         }
         $vars['aop'] = 'delete_incoming';
         $cnf_js['QUESTION'] = dgettext('filecabinet', 'Are you sure you want to delete this file?');
         $cnf_js['ADDRESS'] = PHPWS_Text::linkAddress('filecabinet', $vars, true);
         $cnf_js['LINK'] = dgettext('filecabinet', 'Delete');
         $links[] = javascript('confirm', $cnf_js);
         $rowtpl['ACTION'] = implode(' | ', $links);
         $tpl['file-list'][] = $rowtpl;
     }
     $tpl['FILENAME_LABEL'] = dgettext('filecabinet', 'File name');
     $tpl['FILETYPE_LABEL'] = dgettext('filecabinet', 'File type');
     $tpl['ACTION_LABEL'] = dgettext('filecabinet', 'Action');
     $this->cabinet->content = PHPWS_Template::process($tpl, 'filecabinet', 'Forms/classify_list.tpl');
 }
开发者ID:HaldunA,项目名称:phpwebsite,代码行数:87,代码来源:Forms.php

示例15: moveBoxesTag

 /**
  * Makes a select form option to move boxes to other parts
  * of the layout
  */
 public static function moveBoxesTag($box)
 {
     $vars['action'] = 'admin';
     $vars['command'] = 'move_popup';
     $vars['box'] = $box->id;
     $js['width'] = 300;
     $js['height'] = 400;
     $js['address'] = PHPWS_Text::linkAddress('layout', $vars, true);
     $js['label'] = '-' . dgettext('layout', 'Click to move') . '-';
     $js['class'] = 'move-popup';
     // Relative because bootstrap breaks z-index without it. z-index to keep to top
     return '<div style="position:relative; z-index: 1000 !important; text-align : center">' . javascript('open_window', $js) . '</div>';
 }
开发者ID:par-orillonsoft,项目名称:phpwebsite,代码行数:17,代码来源:Layout.php


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