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


PHP eF_checkParameter函数代码示例

本文整理汇总了PHP中eF_checkParameter函数的典型用法代码示例。如果您正苦于以下问题:PHP eF_checkParameter函数的具体用法?PHP eF_checkParameter怎么用?PHP eF_checkParameter使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


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

示例1: getLessonFromId

function getLessonFromId()
{
    if (eF_checkParameter($_GET['loglessonid'], 'id')) {
        $id = $_GET["loglessonid"];
        $result = eF_getTableData('lessons', 'id, name', "id='" . $id . "'");
        echo json_encode(array('name' => $result[0]['name'], 'id' => $result[0]['id']));
    }
}
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:8,代码来源:admin.php

示例2: __construct

 public function __construct($param, $isCouponCode)
 {
     if ($isCouponCode && eF_checkParameter($param, 'text')) {
         $result = eF_getTableData("coupons", "*", "code='" . $param . "'");
         $param = $result[0];
     }
     parent::__construct($param);
 }
开发者ID:bqq1986,项目名称:efront,代码行数:8,代码来源:coupons.class.php

示例3: getModule

 public function getModule()
 {
     // Get smarty variable
     $smarty = $this->getSmartyVar();
     if (isset($_GET['delete_faq']) && eF_checkParameter($_GET['delete_faq'], 'id')) {
         eF_deleteTableData("module_faq", "id=" . $_GET['delete_faq']);
         eF_redirect("" . $this->moduleBaseUrl . "&message=" . urlencode(_FAQ_SUCCESFULLYDELETEDFAQENTRY) . "&message_type=success");
     } else {
         if (isset($_GET['add_faq']) || isset($_GET['edit_faq']) && eF_checkParameter($_GET['edit_faq'], 'id')) {
             $load_editor = true;
             //TODO
             $form = new HTML_QuickForm("faq_entry_form", "post", $_SERVER['REQUEST_URI'], "", null, true);
             $form->registerRule('checkParameter', 'callback', 'eF_checkParameter');
             //Register this rule for checking user input with our function, eF_checkParameter
             $form->addElement('textarea', 'question', null, 'class = "simpleEditor" style = "width:100%;height:5em;"');
             $form->addElement('textarea', 'answer', null, 'class = "simpleEditor" style = "width:100%;height:25em;"');
             $currentLesson = $this->getCurrentLesson();
             $units = eF_getTableDataFlat("content", "id, name", "lessons_ID = " . $currentLesson->lesson['id']);
             //$units['id'] = array_merge(array("0"), $units['id']);
             //$units['name'] = array_merge(array(_FAQ_GENERAL_LESSON), $units['name']);
             sizeof($units) > 0 ? $units = array(0 => _FAQ_GENERAL_LESSON) + array_combine($units['id'], $units['name']) : ($units = array("0" => _FAQ_GENERAL_LESSON));
             $form->addElement('select', 'related_content', _CONTENT, $units, 'class = "inputSelectLong"');
             $form->addElement('submit', 'submit_faq', _SUBMIT, 'class = "flatButton"');
             if (isset($_GET['edit_faq'])) {
                 $faq_entry = eF_getTableData("module_faq", "*", "id=" . $_GET['edit_faq']);
                 $form->setDefaults(array('related_content' => $faq_entry[0]['unit_ID'], 'question' => $faq_entry[0]['question'], 'answer' => $faq_entry[0]['answer']));
             }
             if ($form->isSubmitted() && $form->validate()) {
                 $fields = array('lessons_ID' => $_SESSION['s_lessons_ID'], 'unit_ID' => $form->exportValue('related_content'), 'question' => $form->exportValue('question'), 'answer' => $form->exportValue('answer'));
                 if (isset($_GET['edit_faq'])) {
                     if (eF_updateTableData("module_faq", $fields, "id=" . $_GET['edit_faq'])) {
                         eF_redirect("" . $this->moduleBaseUrl . "&message=" . urlencode(_FAQ_SUCCESFULLYUPDATEDFAQENTRY) . "&message_type=success");
                     } else {
                         $this->setMessageVar(_FAQ_PROBLEMUPDATINGFAQENTRY, 'failure');
                     }
                 } else {
                     if (eF_insertTableData("module_faq", $fields)) {
                         eF_redirect("" . $this->moduleBaseUrl . "&message=" . urlencode(_FAQ_SUCCESFULLYINSERTEDFAQENTRY) . "&message_type=success");
                     } else {
                         $this->setMessageVar(_FAQ_PROBLEMINSERTINGFAQENTRY, 'failure');
                     }
                 }
             }
             $renderer = new HTML_QuickForm_Renderer_ArraySmarty($smarty);
             $form->accept($renderer);
             $smarty->assign('T_FAQ_FORM', $renderer->toArray());
         } else {
             $currentLesson = $this->getCurrentLesson();
             $faq = eF_getTableDataFlat("module_faq", "*", "lessons_ID=" . $currentLesson->lesson['id']);
             $currentUser = $this->getCurrentUser();
             $smarty->assign("T_FAQUSERLESSONROLE", $currentUser->getRole($currentLesson));
             $smarty->assign("T_FAQ", $faq);
             $smarty->assign("T_QUESTIONS_FOUND", sizeof($faq));
         }
     }
     return true;
 }
开发者ID:bqq1986,项目名称:efront,代码行数:57,代码来源:module_faq.class.php

示例4: getLessonFromId

function getLessonFromId()
{
    if (eF_checkParameter($_GET['loglessonid'], 'id')) {
        $id = $_GET["loglessonid"];
        $sql = "SELECT name FROM lessons WHERE id='" . $id . "'";
        $result = mysql_query($sql);
    }
    while ($lesson = mysql_fetch_array($result)) {
        echo $lesson["name"];
    }
}
开发者ID:kaseya-university,项目名称:efront,代码行数:11,代码来源:admin.php

示例5: __construct

 /**
  * Instantiate direction
  *
  * This function is the class constructor, which instantiates the
  * EfrontDirection object, based on the direction values
  * <br/>Example:
  * <code>
  * $direction_array = eF_getTableData("directions", "*", "id=4");
  * $direction = new EfrontDirection($direction_array[0]);
  * </code>
  *
  * @param array $array The direction values
  * @since 3.5.0
  * @access public
  */
 function __construct($direction)
 {
     if (!is_array($direction)) {
         if (!eF_checkParameter($direction, 'id')) {
             throw new EfrontLessonException(_INVALIDID . ': ' . $direction, EfrontDirectionException::INVALID_ID);
         }
         $result = eF_getTableData("directions", "*", "id=" . $direction);
         if (sizeof($result) == 0) {
             throw new EfrontLessonException(_CATEGORYDOESNOTEXIST . ': ' . $direction, EfrontDirectionException::DIRECTION_NOT_EXISTS);
         }
         $direction = $result[0];
     }
     parent::__construct($direction);
 }
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:29,代码来源:direction.class.php

示例6: create

 /**
  * Create Payment
  *
  * This function is used to create a new payment entry
  *
  * @param array $fields The payment properties
  * @return payment The created payment
  * @since 3.6.0
  * @access public
  */
 public static function create($fields = array())
 {
     $fields['lessons'] = array_filter($fields['lessons'], 'is_numeric');
     if (isset($fields['lessons']) && sizeof($fields['lessons']) > 0) {
         $lessonNames = eF_getTableDataFlat("lessons", "name", "id in (" . implode(",", $fields['lessons']) . ")");
     }
     $fields['courses'] = array_filter($fields['courses'], 'is_numeric');
     if (isset($fields['courses']) && sizeof($fields['courses']) > 0) {
         $courseNames = eF_getTableDataFlat("courses", "name", "id in (" . implode(",", $fields['courses']) . ")");
     }
     !isset($fields['charset']) or $fields['comments'] = iconv($fields['charset'], "UTF-8", $fields['comments']);
     $fields = array('timestamp' => isset($fields['timestamp']) && eF_checkParameter($fields['timestamp'], 'timestamp') ? $fields['timestamp'] : time(), 'users_LOGIN' => isset($fields['users_LOGIN']) && eF_checkParameter($fields['users_LOGIN'], 'login') ? $fields['users_LOGIN'] : $_SESSION['s_login'], 'amount' => isset($fields['amount']) && is_numeric($fields['amount']) && $fields['amount'] > 0 ? $fields['amount'] : 0, 'status' => isset($fields['status']) && $fields['status'] ? $fields['status'] : 'completed', 'txn_id' => $fields['txn_id'], 'comments' => $fields['comments'], 'method' => isset($fields['method']) && in_array($fields['method'], array_keys(self::$methods)) ? $fields['method'] : 'manual');
     $user = EfrontUserFactory::factory($fields['users_LOGIN']);
     if ($fields['method'] == 'paypal') {
         //@todo: get corresponding paypal_data id
         $eventType = EfrontEvent::NEW_PAYPAL_PAYMENT;
     } else {
         if ($fields['method'] == 'balance') {
             $eventType = EfrontEvent::NEW_BALANCE_PAYMENT;
         } else {
             if ($fields['method'] == 'manual') {
                 $eventType = EfrontEvent::NEW_MANUAL_PAYMENT;
             } else {
                 $eventType = false;
             }
         }
     }
     $newId = eF_insertTableData("payments", $fields);
     $result = eF_getTableData("payments", "*", "id=" . $newId);
     //We perform an extra step/query for retrieving data, since this way we make sure that the array fields will be in correct order (first id, then name, etc)
     $payment = new payments($result[0]['id']);
     if ($eventType) {
         $event = array("type" => $eventType, "users_LOGIN" => $user->user['login'], "users_name" => $user->user['name'], "users_surname" => $user->user['surname'], "entity_ID" => $newId);
         if (isset($lessonNames) && !empty($lessonNames)) {
             $event['lessons_name'] = _LESSONS . ': ' . implode(",", $lessonNames['name']) . '<br>';
         }
         if (isset($courseNames) && !empty($courseNames)) {
             $event['lessons_name'] .= _COURSES . ': ' . implode(",", $courseNames['name']);
         }
         if ($fields['credit']) {
             $event['lessons_name'] .= _BALANCE . ': ' . $fields['credit'];
         }
         EfrontEvent::triggerEvent($event);
     }
     return $payment;
 }
开发者ID:bqq1986,项目名称:efront,代码行数:56,代码来源:payments.class.php

示例7: __construct

 /**
  * Instantiate entity
  *
  * @param $param The parameters to instantiate entity with
  * @since 3.6.0
  * @access public
  */
 public function __construct($param)
 {
     if (!$this->entity) {
         $this->entity = strtolower(str_replace('Efront', '', get_class($this)));
     }
     if (!is_array($param)) {
         if (!eF_checkParameter($param, 'id')) {
             throw new EfrontEntityException(_INVALIDID . ': ' . $param, EfrontEntityException::INVALID_ID);
         }
         $result = eF_getTableData($this->entity, "*", "id={$param}");
         if (sizeof($result) == 0) {
             throw new EfrontEntityException(_ENTITYNOTFOUND . ': ' . htmlspecialchars($param), EfrontEntityException::ENTITY_NOT_EXIST);
         }
         $this->{$this->entity} = $result[0];
     } else {
         $this->{$this->entity} = $param;
     }
 }
开发者ID:bqq1986,项目名称:efront,代码行数:25,代码来源:entity.class.php

示例8: clearDuplicates

 /**
  * Clear duplicate comments
  * 
  * There are times that the system may end up with duplicate comments, like when
  * copying content. This function is used to effectively eliminate duplicates.
  * <br/>Example:
  * <code>
  * comments :: clearDuplicates($currentLesson);
  * </code>
  * 
  * @param mixed $lesson a lesson id or an EfrontLesson object
  * @access public
  * @static
  * @since 3.6.0
  */
 public static function clearDuplicates($lesson)
 {
     if ($lesson instanceof EfrontLesson) {
         $lessonId = $lesson->lesson['id'];
     } elseif (eF_checkParameter($lesson, 'id')) {
         $lessonId = $lesson;
     } else {
         throw new EfrontLessonException(_INVALIDID . ": {$lesson}", EfrontLessonException::INVALID_ID);
     }
     $result = eF_getTableData("comments", "*", "lessons_ID=" . $lessonId, "id");
     foreach ($result as $value) {
         $commentsTerms[$value['id']] = $value;
         $id = $value['id'];
         unset($value['id']);
         $checksums[$id] = md5(serialize($value));
     }
     $uniques = array_unique($checksums);
     $duplicates = array_diff_key($checksums, $uniques);
     foreach ($duplicates as $key => $value) {
         $comments = new comments($commentsTerms[$key]);
         $comments->delete();
     }
 }
开发者ID:bqq1986,项目名称:efront,代码行数:38,代码来源:comments.class.php

示例9: foreach

                foreach ($supervisedBranches as $value) {
                    $branches[] = $value['branch_ID'];
                }
                if (!empty($branches)) {
                    $stats_filters[] = array("table" => "module_hcd_employee_works_at_branch as filter_eb", "joinField" => "filter_eb.users_LOGIN", "condition" => "(filter_eb.branch_ID in (" . implode(",", $branches) . ") AND filter_eb.assigned = 1)");
                } else {
                    $stats_filters[] = array("table" => "module_hcd_employee_works_at_branch as filter_eb", "joinField" => "filter_eb.users_LOGIN", "condition" => "(filter_eb.branch_ID != '' AND filter_eb.assigned = 1)");
                }
            }
        }
    }
    if (isset($_GET['job_filter']) && $_GET['job_filter'] != 0) {
        $jobs_array = explode(",", $_GET['job_filter']);
        $flag = 1;
        foreach ($jobs_array as $value) {
            $flag = $flag && eF_checkParameter($value, 'id');
        }
        if ($flag) {
            $result = eF_getTableDataFlat("module_hcd_job_description", "job_description_ID,branch_ID", " description IN (SELECT description FROM module_hcd_job_description WHERE job_description_ID IN (" . implode(",", $jobs_array) . "))");
            $jobs_array = $result['job_description_ID'];
            $stats_filters[] = array("table" => "module_hcd_employee_has_job_description as filter_ej", "joinField" => "filter_ej.users_login", "condition" => "(filter_ej.job_description_ID in (" . implode(",", $jobs_array) . "))");
        }
    }
}
#cpp#endif
if (!isset($_GET['ajax'])) {
    if ($_SESSION['s_type'] == 'administrator') {
        //supervisors don't see groups
        $groups = EfrontGroup::getGroups();
        $smarty->assign("T_GROUPS", $groups);
    } else {
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:stats_filters.php

示例10: factory

 /**
  * Construct user object
  *
  * This function is used to construct a user object, based on the user type.
  * Specifically, it creates an EfrontStudent, EfrontProfessor, EfrontAdministrator etc
  * An optional password verification may take place, if $password is specified
  * If $user is a login name, the function queries database. Alternatively, it may
  * use a prepared user array, which is mostly convenient when having to perform
  * multiple initializations
  * <br/>Example :
  * <code>
  * $user = EfrontUserFactory :: factory('jdoe');			//Use factory function to instantiate user object with login 'jdoe'
  * $userData = eF_getTableData("users", "*", "login='jdoe'");
  * $user = EfrontUserFactory :: factory($userData[0]);	  //Use factory function to instantiate user object using prepared data
  * </code>
  *
  * @param mixed $user A user login or an array holding user data
  * @param string $password An optional password to check against
  * @param string $forceType Force the type to initialize the user, for example for when a professor accesses student.php as student
  * @return EfrontUser an object of a class extending EfrontUser
  * @since 3.5.0
  * @access public
  * @static
  */
 public static function factory($user, $password = false, $forceType = false)
 {
     if ((is_string($user) || is_numeric($user)) && eF_checkParameter($user, 'login')) {
         $result = eF_getTableData("users", "*", "login='" . $user . "'");
         if (sizeof($result) == 0) {
             throw new EfrontUserException(_USERDOESNOTEXIST . ': ' . $user, EfrontUserException::USER_NOT_EXISTS);
         } else {
             if ($password !== false && $password != $result[0]['password']) {
                 throw new EfrontUserException(_INVALIDPASSWORDFORUSER . ': ' . $user, EfrontUserException::INVALID_PASSWORD);
             }
         }
         /*
         if (strcmp($result[0]['login'], $user) !=0){
         	throw new EfrontUserException(_USERDOESNOTEXIST.': '.$user, EfrontUserException :: USER_NOT_EXISTS);
         }
         */
         $user = $result[0];
     } elseif (!is_array($user)) {
         throw new EfrontUserException(_INVALIDLOGIN . ': ' . $user, EfrontUserException::INVALID_PARAMETER);
     }
     $forceType ? $userType = $forceType : ($userType = $user['user_type']);
     switch ($userType) {
         case 'administrator':
             $factory = new EfrontAdministrator($user, $password);
             break;
         case 'professor':
             $factory = new EfrontProfessor($user, $password);
             break;
         case 'student':
             $factory = new EfrontStudent($user, $password);
             break;
         default:
             throw new EfrontUserException(_INVALIDUSERTYPE . ': "' . $userType . '"', EfrontUserException::INVALID_TYPE);
             break;
     }
     if (G_VERSIONTYPE == 'enterprise') {
         #cpp#ifdef ENTERPRISE
         $factory->aspects['hcd'] = EfrontEmployeeFactory::factory($factory);
     }
     #cpp#endif
     return $factory;
 }
开发者ID:kaseya-university,项目名称:efront,代码行数:66,代码来源:user.class-backup.php

示例11: eF_getTableData

 if ($certificate_tpl_id <= 0) {
     $mainTemplate = eF_getTableData("certificate_templates", "id", "certificate_name='" . CERTIFICATES_MAIN_TEMPLATE_NAME . "'");
     // XXX
     $certificate_tpl_id = $mainTemplate[0]['id'];
 }
 $issued_data = unserialize($result[0]['issued_certificate']);
 $templateData = eF_getTableData("certificate_templates", "certificate_xml", "id=" . $certificate_tpl_id);
 foreach (eF_loadAllModules() as $module) {
     $module->onXMLExportCourseCertificate($issued_data, $templateData, $course, $_GET['user']);
 }
 $userName = $issued_data['user_name'];
 $userSurName = $issued_data['user_surname'];
 $courseName = $issued_data['course_name'];
 $courseGrade = $issued_data['grade'];
 $serialNumber = $issued_data['serial_number'];
 if (eF_checkParameter($issued_data['date'], 'timestamp')) {
     $certificateDate = formatTimestamp($issued_data['date']);
 }
 if ($course->course['certificate_expiration'] != 0) {
     $expirationArray = convertTimeToDays($course->course['certificate_expiration']);
     $expire_certificateTimestamp = getCertificateExpirationTimestamp($issued_data['date'], $expirationArray);
     $expireDate = formatTimestamp($expire_certificateTimestamp);
 }
 $xmlExport = new XMLExport($templateData[0]['certificate_xml']);
 $creator = $xmlExport->getCreator();
 $author = $xmlExport->getAuthor();
 $subjct = $xmlExport->getSubject($userName . ' ' . $userSurName);
 $keywrd = $xmlExport->getKeywords();
 $orientation = $xmlExport->getOrientation();
 $pdf = new TCPDF($orientation, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
 $pdf->SetCreator($creator);
开发者ID:kaseya-university,项目名称:efront,代码行数:31,代码来源:course_settings.php

示例12: eF_redirect

             EfrontEvent::triggerEvent(array("type" => EfrontEvent::SYSTEM_FORGOTTEN_PASSWORD, "users_LOGIN" => $user->user['login'], "users_name" => $user->user['name'], "users_surname" => $user->user['surname']));
             $message = _ANEMAILHASBEENSENT;
             $message_type = 'success';
             if ($_SESSION['login_mode'] != 1) {
                 eF_redirect('' . basename($_SERVER['PHP_SELF']) . '?message=' . urlencode($message) . '&message_type=' . $message_type);
             }
         }
     } catch (Exception $e) {
         $message = _NONEXISTINGMAIL;
         $message_type = 'failure';
         eF_redirect('' . basename($_SERVER['PHP_SELF']) . '?ctg=reset_pwd&message=' . urlencode($message) . '&message_type=' . $message_type);
     }
 } elseif (isset($_GET['id']) && isset($_GET['login'])) {
     //Second stage, user received the email and clicked on the link
     $login = $_GET['login'];
     if (!eF_checkParameter($login, 'login')) {
         //Possible hacking attempt: malformed user
         $message = _INVALIDUSER;
         $message_type = 'failure';
     } else {
         $user = eF_getTableData("users", "email, name", "login='" . $login . "'");
         if (strcmp($_GET['id'], EfrontUser::createPassword($login)) == 0 && sizeof($user) > 0) {
             $password = implode("", array_map(create_function('$v', 'return chr($v);'), array_rand(array_flip(array_merge(range(48, 57), range(64, 90), range(97, 122))), 10)));
             $password_encrypted = EfrontUser::createPassword($password);
             eF_updateTableData("users", array('password' => $password_encrypted), "login='{$login}'");
             EfrontEvent::triggerEvent(array("type" => EfrontEvent::SYSTEM_NEW_PASSWORD_REQUEST, "users_LOGIN" => $login, "entity_name" => $password));
             $message = _EMAILWITHPASSWORDSENT;
             eF_redirect('' . basename($_SERVER['PHP_SELF']) . '?message=' . urlencode($message) . '&message_type=success');
         } else {
             $message = _INVALIDUSER;
             $message_type = 'failure';
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:index.php

示例13: catch

                            $editLesson->archiveLessonUsers(array_keys($users));
                        }
                    }
                }
                exit;
            }
        } catch (Exception $e) {
            handleAjaxExceptions($e);
        }
    }
} else {
    if (isset($_GET['lesson_info']) && eF_checkParameter($_GET['lesson_info'], 'id')) {
        /***/
        require_once "lesson_information.php";
    } else {
        if (isset($_GET['lesson_settings']) && eF_checkParameter($_GET['lesson_settings'], 'id')) {
            $currentLesson = new EfrontLesson($_GET['lesson_settings']);
            $smarty->assign("T_CURRENT_LESSON", $currentLesson);
            $loadScripts[] = 'scriptaculous/scriptaculous';
            $loadScripts[] = 'scriptaculous/effects';
            $baseUrl = 'ctg=lessons&lesson_settings=' . $currentLesson->lesson['id'];
            $smarty->assign("T_BASE_URL", $baseUrl);
            require_once "lesson_settings.php";
        } else {
            //The default action is to just print a list with the lessons defined in the system
            //    $filesystem = new FileSystemTree(G_LESSONSPATH, true);
            $form = new HTML_QuickForm("import_lesson_form", "post", basename($_SERVER['PHP_SELF']) . "?ctg=lessons", "", null, true);
            //Build the form
            $form->addElement('file', 'import_content', _UPLOADLESSONFILE, 'class = "inputText"');
            $form->setMaxFileSize(FileSystemTree::getUploadMaxSize() * 1024);
            //getUploadMaxSize returns size in KB
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:lessons.php

示例14: eF_getTableDataFlat

 //remove inactive and archived lessons
 $result = eF_getTableDataFlat("lessons", "id", "active=0 OR archive!=''");
 if (!empty($result['id'])) {
     foreach ($forums as $key => $value) {
         if (in_array($value['lessons_ID'], $result['id']) !== false) {
             unset($forums[$key]);
         }
     }
 }
 //pr($forums);
 $dataSource = $forums;
 $tableName = 'forumsTable';
 /**Handle sorted table's sorting and filtering*/
 include "sorted_table.php";
 $smarty->assign("T_FORUMS", $forums);
 isset($_GET['forum']) && eF_checkParameter($_GET['forum'], 'id') ? $parent_forum = $_GET['forum'] : ($parent_forum = 0);
 $smarty->assign("T_PARENT_FORUM", $parent_forum);
 $smarty->assign("T_HAS_SUBFORUMS", sizeof($forumTree[$_GET['forum']]));
 if ($_SESSION['s_type'] != 'administrator' && $_SESSION['s_current_branch']) {
     //this applies to supervisors only
     $polls = eF_getTableData("f_poll, module_hcd_employee_works_at_branch", "*", "f_forums_ID=" . $parent_forum . " and module_hcd_employee_works_at_branch.users_login=f_poll.users_LOGIN and module_hcd_employee_works_at_branch.branch_ID=" . $currentBranch->branch['branch_ID']);
     $topics = eF_getTableData("f_topics, module_hcd_employee_works_at_branch", "*", "f_forums_ID=" . $parent_forum . " and module_hcd_employee_works_at_branch.users_login=f_topics.users_LOGIN and module_hcd_employee_works_at_branch.branch_ID=" . $currentBranch->branch['branch_ID']);
 } else {
     $polls = eF_getTableData("f_poll", "*", "f_forums_ID=" . $parent_forum);
     $topics = eF_getTableData("f_topics", "*", "f_forums_ID=" . $parent_forum);
 }
 foreach ($topics as $k => $topic) {
     if ($_SESSION['s_type'] != 'administrator' && $_SESSION['s_current_branch']) {
         //this applies to supervisors only
         $result = eF_getTableDataFlat("f_messages, module_hcd_employee_works_at_branch", "f_messages.users_LOGIN, f_messages.id, f_messages.timestamp, f_messages.body", "f_topics_ID=" . $topic['id'] . " and module_hcd_employee_works_at_branch.users_login=f_messages.users_LOGIN and module_hcd_employee_works_at_branch.branch_ID=" . $currentBranch->branch['branch_ID']);
     } else {
开发者ID:jiangjunt,项目名称:efront_open_source,代码行数:31,代码来源:forum.php

示例15: EfrontDirectory

                } else {
                    $message = '"' . $className . '": ' . _MODULEISALREADYINSTALLED;
                    $message_type = 'failure';
                    //eF_deleteFolder(G_MODULESPATH.$module_folder.'/');
                    $dir = new EfrontDirectory(G_MODULESPATH . $module_folder . '/');
                    $dir->delete();
                }
            } else {
                $message = _NOMODULECLASSFOUND . ' "' . $className . '" : ' . G_MODULESPATH . $module_folder;
                $message_type = 'failure';
                //$dir = new EfrontDirectory(G_MODULESPATH.$module_folder.'/');
                //$dir -> delete();
                //eF_deleteFolder(G_MODULESPATH.$module_folder.'/');
            }
        }
    } elseif (isset($_GET['export_module']) && eF_checkParameter($_GET['export_module'], 'filename')) {
        if (isset($currentUser->coreAccess['modules'])) {
            throw new EfrontSystemException(_UNAUTHORIZEDACCESS, EfrontSystemException::UNAUTHORIZED_ACCESS);
        }
        $className = $_GET['export_module'];
        $directory = new EfrontDirectory(G_MODULESPATH . $className);
        $file = $directory->compress(false, false);
        echo $file['url_path'];
        exit;
    }
} catch (Exception $e) {
    handleAjaxExceptions($e);
}
$modulesList = eF_getTableData("modules", "*", "", "active desc");
// Check for errors in modules
foreach ($modulesList as $key => $module) {
开发者ID:bqq1986,项目名称:efront,代码行数:31,代码来源:modules.php


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