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


PHP Localize函数代码示例

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


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

示例1: ErrorMessage

function ErrorMessage($errors, $code = 'error')
{
    if ($errors) {
        $return = "<TABLE border=0><TR><TD align=left>";
        if (count($errors) == 1) {
            if ($code == 'error' || $code == 'fatal') {
                $return .= '<b><font color=#CC0000>' . Localize('colon', _('Error')) . '</font></b> ';
            } else {
                $return .= '<b><font color=#00CC00>' . Localize('colon', _('Note')) . '</font></b> ';
            }
            $return .= $errors[0] ? $errors[0] : $errors[1];
        } else {
            if ($code == 'error' || $code == 'fatal') {
                $return .= "<b><font color=#CC0000>" . Localize('colon', _('Errors')) . "</font></b>";
            } else {
                $return .= '<b><font color=#00CC00>' . Localize('colon', _('Note')) . '</font></b>';
            }
            $return .= '<ul>';
            foreach ($errors as $value) {
                $return .= "<LI><font size=-1>{$value}</font></LI>\n";
            }
            $return .= '</ul>';
        }
        $return .= "</TD></TR></TABLE><br>";
        if ($code == 'fatal') {
            echo $return;
            if (!$_REQUEST['_CENTRE_PDF']) {
                Warehouse('footer');
            }
            exit;
        }
        return $return;
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:34,代码来源:ErrorMessage.fnc.php

示例2: MyWidgets

function MyWidgets($item)
{
    global $extra, $_CENTRE;
    switch ($item) {
        case 'birthmonth':
            $options = array('1' => _('January'), '2' => _('February'), '3' => _('March'), '4' => _('April'), '5' => _('May'), '6' => _('June'), '7' => _('July'), '8' => _('August'), '9' => _('September'), '10' => _('October'), '11' => _('November'), '12' => _('December'));
            if ($_REQUEST['birthmonth']) {
                $extra['SELECT'] .= ",to_char(s.CUSTOM_200000004,'Mon DD') AS BIRTHMONTH";
                $extra['WHERE'] .= " AND extract(month from s.CUSTOM_200000004)='{$_REQUEST['birthmonth']}'";
                $extra['columns_after']['BIRTHMONTH'] = _('Birth Month Day');
                if (!$extra['NoSearchTerms']) {
                    $_CENTRE['SearchTerms'] .= '<font color=gray><b>' . Localize('colon', _('Birth Month')) . ' </b></font>' . $options[$_REQUEST['birthmonth']] . '<BR>';
                }
            }
            $extra['search'] .= '<TR><TD align=right width=120>' . _('Birth Month') . '</TD><TD><SELECT name=birthmonth><OPTION value="">' . _('N/A');
            foreach ($options as $key => $val) {
                $extra['search'] .= '<OPTION value="' . $key . '">' . $val;
            }
            $extra['search'] .= '</SELECT></TD></TR>';
            break;
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:22,代码来源:AdvancedReport.php

示例3: MyWidgets

function MyWidgets($item)
{
    global $extra, $_ROSARIO;
    switch ($item) {
        case 'birthmonth':
            $options = array('1' => _('January'), '2' => _('February'), '3' => _('March'), '4' => _('April'), '5' => _('May'), '6' => _('June'), '7' => _('July'), '8' => _('August'), '9' => _('September'), '10' => _('October'), '11' => _('November'), '12' => _('December'));
            if ($_REQUEST['birthmonth']) {
                $extra['SELECT'] .= ",to_char(s.CUSTOM_200000004,'Mon DD') AS BIRTHMONTH";
                $extra['WHERE'] .= " AND extract(month from s.CUSTOM_200000004)='{$_REQUEST['birthmonth']}'";
                $extra['columns_after']['BIRTHMONTH'] = _('Birth Month');
                if (!$extra['NoSearchTerms']) {
                    $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Birth Month')) . ' </b></span>' . $options[$_REQUEST['birthmonth']] . '<BR />';
                }
            }
            $extra['search'] .= '<TR><TD style="text-align:right; width:120px:"><label for="birthmonth">' . _('Birth Month') . '</label></TD><TD><SELECT name="birthmonth" id="birthmonth"><OPTION value="">' . _('N/A');
            foreach ($options as $key => $val) {
                $extra['search'] .= '<OPTION value="' . $key . '">' . $val;
            }
            $extra['search'] .= '</SELECT></TD></TR>';
            break;
        case 'birthday':
            $options = array('1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', '7' => '7', '8' => '8', '9' => '9', '10' => '10', '11' => '11', '12' => '12', '13' => '13', '14' => '14', '15' => '15', '16' => '16', '17' => '17', '18' => '18', '19' => '19', '20' => '20', '21' => '21', '22' => '22', '23' => '23', '24' => '24', '25' => '25', '26' => '26', '27' => '27', '28' => '28', '29' => '29', '30' => '30', '31' => '31');
            if ($_REQUEST['birthday']) {
                $extra['SELECT'] .= ",to_char(s.CUSTOM_200000004,'DD') AS BIRTHDAY";
                $extra['WHERE'] .= " AND extract(day from s.CUSTOM_200000004)='{$_REQUEST['birthday']}'";
                $extra['columns_after']['BIRTHDAY'] = _('Birth Day');
                if (!$extra['NoSearchTerms']) {
                    $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Birth Day')) . ' </b></span>' . $options[$_REQUEST['birthday']] . '<BR />';
                }
            }
            $extra['search'] .= '<TR><TD style="text-align:right; width:120px:"><label for="birthday">' . _('Birth Day') . '</label></TD><TD><SELECT name="birthday" id="birthday"><OPTION value="">' . _('N/A');
            foreach ($options as $key => $val) {
                $extra['search'] .= '<OPTION value="' . $key . '">' . $val;
            }
            $extra['search'] .= '</SELECT></TD></TR>';
            break;
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:38,代码来源:AdvancedReport.php

示例4: _makeExtra

function _makeExtra($value, $title = '')
{
    global $THIS_RET;
    if ($THIS_RET['WITH_TEACHER_ID']) {
        $return .= Localize('colon', _('With')) . '&nbsp;' . GetTeacher($THIS_RET['WITH_TEACHER_ID']) . '<BR>';
    }
    if ($THIS_RET['NOT_TEACHER_ID']) {
        $return .= Localize('colon', _('Not With')) . '&nbsp;' . GetTeacher($THIS_RET['NOT_TEACHER_ID']) . '<BR>';
    }
    if ($THIS_RET['WITH_PERIOD_ID']) {
        $return .= Localize('colon', _('On')) . '&nbsp;' . GetPeriod($THIS_RET['WITH_PERIOD_ID']) . '<BR>';
    }
    if ($THIS_RET['NOT_PERIOD_ID']) {
        $return .= Localize('colon', _('Not On')) . '&nbsp;' . GetPeriod($THIS_RET['NOT_PERIOD_ID']) . '<BR>';
    }
    if ($THIS_RET['PRIORITY']) {
        $return .= Localize('colon', _('Priority')) . '&nbsp;' . $THIS_RET['PRIORITY'] . '<BR>';
    }
    if ($THIS_RET['MARKING_PERIOD_ID']) {
        $return .= Localize('colon', _('Marking Period')) . '&nbsp;' . GetMP($THIS_RET['MARKING_PERIOD_ID']) . '<BR>';
    }
    return $return;
}
开发者ID:linil,项目名称:centreSIS,代码行数:23,代码来源:PrintRequests.php

示例5: ErrorMessage

function ErrorMessage($errors, $code = 'error')
{
    if ($errors) {
        //modif Francois: css WPadmin
        if (count($errors) == 1) {
            if ($code == 'error' || $code == 'fatal') {
                $return .= '<div class="error"><p><IMG SRC="assets/x.png" class="alignImg">&nbsp;<b>' . Localize('colon', _('Error')) . '</b> ';
            } else {
                $return .= '<div class="updated"><p><b>' . Localize('colon', _('Note')) . '</b> ';
            }
            $return .= ($errors[0] ? $errors[0] : $errors[1]) . '</p>';
        } else {
            if ($code == 'error' || $code == 'fatal') {
                $return .= '<div class="error"><p><IMG SRC="assets/x.png" class="alignImg">&nbsp;<b>' . Localize('colon', _('Errors')) . "</b></p>";
            } else {
                $return .= '<div class="updated"><p>&nbsp;<b>' . Localize('colon', _('Note')) . '</b></p>';
            }
            $return .= '<ul>';
            foreach ($errors as $value) {
                $return .= '<LI><span class="size-1">' . $value . '</span></LI>' . "\n";
            }
            $return .= '</ul>';
        }
        $return .= '</div><BR />';
        if ($code == 'fatal') {
            echo $return;
            if (!isset($_REQUEST['_ROSARIO_PDF'])) {
                Warehouse('footer');
            } else {
                global $print_data;
                PDFStop($print_data);
            }
            exit;
        }
        return $return;
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:37,代码来源:ErrorMessage.fnc.php

示例6: MyWidgets

function MyWidgets($item)
{
    global $extra, $_CENTRE;
    switch ($item) {
        case 'ly_course':
            if ($_REQUEST['w_ly_course_period_id']) {
                if ($_REQUEST['w_ly_course_period_id_which'] == 'course') {
                    $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "'"));
                    $extra['WHERE'] .= " AND exists(SELECT '' FROM SCHEDULE WHERE STUDENT_ID=ssm.STUDENT_ID AND COURSE_ID='" . $course[1]['COURSE_ID'] . "')";
                    if (!$extra['NoSearchTerms']) {
                        $_CENTRE['SearchTerms'] .= '<font color=gray><b>Last Year Course: </b></font>' . $course[1]['COURSE_TITLE'] . '<BR>';
                    }
                } else {
                    $extra['WHERE'] .= " AND exists(SELECT '' FROM SCHEDULE WHERE STUDENT_ID=ssm.STUDENT_ID AND COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "')";
                    $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "'"));
                    if (!$extra['NoSearchTerms']) {
                        $_CENTRE['SearchTerms'] .= '<font color=gray><b>' . Localize('colon', _('Last Year Course Period')) . ' </b></font>' . $course[1]['COURSE_TITLE'] . ' - ' . $course[1]['TITLE'] . '<BR>';
                    }
                }
            }
            $extra['search'] .= "<TR><TD align=right width=120>" . _('Last Year Course') . "</TD><TD><DIV id=ly_course_div></DIV> <A HREF=# onclick='window.open(\"Modules.php?modname=misc/ChooseCourse.php&last_year=true\",\"\",\"scrollbars=yes,resizable=yes,width=800,height=400\");'><SMALL>" . _('Choose') . "</SMALL></A></TD></TR>";
            break;
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:24,代码来源:functions.inc.php

示例7: MyWidgets

function MyWidgets($item)
{
    global $extra, $_ROSARIO;
    switch ($item) {
        case 'ly_course':
            if ($_REQUEST['w_ly_course_period_id']) {
                if ($_REQUEST['w_ly_course_period_id_which'] == 'course') {
                    $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "'"));
                    $extra['WHERE'] .= " AND exists(SELECT '' FROM SCHEDULE WHERE STUDENT_ID=ssm.STUDENT_ID AND COURSE_ID='" . $course[1]['COURSE_ID'] . "')";
                    if (!$extra['NoSearchTerms']) {
                        $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>Last Year Course: </b></span>' . $course[1]['COURSE_TITLE'] . '<BR />';
                    }
                } else {
                    $extra['WHERE'] .= " AND exists(SELECT '' FROM SCHEDULE WHERE STUDENT_ID=ssm.STUDENT_ID AND COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "')";
                    $course = DBGet(DBQuery("SELECT c.TITLE AS COURSE_TITLE,cp.TITLE,cp.COURSE_ID FROM COURSE_PERIODS cp,COURSES c WHERE c.COURSE_ID=cp.COURSE_ID AND cp.COURSE_PERIOD_ID='" . $_REQUEST['w_ly_course_period_id'] . "'"));
                    if (!$extra['NoSearchTerms']) {
                        $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Last Year Course Period')) . ' </b></span>' . $course[1]['COURSE_TITLE'] . ' - ' . $course[1]['TITLE'] . '<BR />';
                    }
                }
            }
            $extra['search'] .= '<TR><TD style="text-align:right; width:120px:">' . _('Last Year Course') . '</TD><TD><DIV id="ly_course_div"></DIV> <A HREF="#" onclick=\'window.open("Modules.php?modname=misc/ChooseCourse.php&last_year=true","","scrollbars=yes,resizable=yes,width=800,height=400");\'>' . _('Choose') . '</A></TD></TR>';
            break;
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:24,代码来源:functions.inc.php

示例8: BuildViewer

function BuildViewer($forDwf = true)
{
    global $debug, $webLayoutDefinition, $cmds, $locale;
    global $sessionId, $username, $password, $orgSessionId;
    global $mapName;
    global $product;
    SetLocalizedFilesPath(GetLocalizationPath());
    try {
        // Initialize web tier with the site configuration file.
        InitializeWebTier();
        //fetch the parameters for this request
        //
        GetRequestParameters();
        //Open a connection with the server
        //
        $createSession = true;
        $cred = new MgUserInformation();
        if ($sessionId != '') {
            $cred->SetMgSessionId($sessionId);
            $createSession = false;
        } else {
            if ($username != '') {
                $cred->SetMgUsernamePassword($username, $password);
            } else {
                requestAuthentication();
                return;
            }
        }
        $site = new MgSiteConnection();
        $cred->SetLocale($locale);
        $cred->SetClientIp(GetClientIp());
        $cred->SetClientAgent(GetClientAgent());
        $site->Open($cred);
        if ($createSession) {
            $site1 = $site->GetSite();
            $sessionId = $site1->CreateSession();
            if ($forDwf == false) {
                $orgSessionId = $sessionId;
            }
        }
        //Get a MgWebLayout object initialized with the specified web layout definition
        //
        $webLayout = null;
        try {
            $resourceSrvc = $site->CreateService(MgServiceType::ResourceService);
            $webLayoutId = new MgResourceIdentifier($webLayoutDefinition);
            $webLayout = new MgWebLayout($resourceSrvc, $webLayoutId);
        } catch (MgUnauthorizedAccessException $e) {
            requestAuthentication();
            return;
        } catch (MgException $e) {
            $shortError = $e->GetExceptionMessage();
            $longErrorMsg = EscapeForHtml($e->GetDetails());
            header("HTTP/1.1 559 ");
            header('Content-Type: text/html; charset=utf-8');
            header("Status: 559 {$shortError}");
            echo "<html>\n<body>\n";
            echo $longErrorMsg;
            echo "</body>\n</html>\n";
            return;
        }
        //calculate the size of the variable elements of the viewer
        //
        $toolBar = $webLayout->GetToolBar();
        $statusBar = $webLayout->GetStatusBar();
        $taskPane = $webLayout->GetTaskPane();
        $infoPane = $webLayout->GetInformationPane();
        $taskBar = $taskPane->GetTaskBar();
        $mapDef = $webLayout->GetMapDefinition();
        $startupScriptCode = $webLayout->GetStartupScript();
        $selectionColor = $webLayout->GetSelectionColor();
        $mapImgFormat = $webLayout->GetMapImageFormat();
        $selImgFormat = $webLayout->GetSelectionImageFormat();
        $pointBuffer = $webLayout->GetPointSelectionBuffer();
        $showTaskPane = $taskPane->IsVisible();
        $showTaskBar = $taskBar->IsVisible();
        $showStatusbar = $statusBar->IsVisible();
        $showToolbar = $toolBar->IsVisible();
        $taskPaneWidth = $taskPane->GetWidth();
        $toolbarHeight = 30;
        $taskbarHeight = 30;
        $statusbarHeight = 26;
        $taskWidth = $showTaskPane ? $taskPaneWidth : 0;
        $toolbarHeight = $showToolbar ? $toolbarHeight : 0;
        $taskbarHeight = $showTaskBar ? $taskbarHeight : 0;
        $statusbarHeight = $showStatusbar ? $statusbarHeight : 0;
        //Encode the initial url so that it does not trip any sub-frames (especially if this url has parameters)
        $taskPaneUrl = urlencode($taskPane->GetInitialTaskUrl());
        $vpath = GetSurroundVirtualPath();
        $defHome = false;
        if ($taskPaneUrl == "") {
            $taskPaneUrl = "gettingstarted.php";
            $defHome = true;
        }
        $mapDefinitionUrl = urlencode($mapDef);
        // NOTE:
        //
        // We don't open a MgMap because it is being created by mapframe.php that is also probably running
        // as this script is running. However the naming convention is fixed enough that we can figure out
        // what to pass to the Task Pane
//.........这里部分代码省略.........
开发者ID:kanbang,项目名称:Colt,代码行数:101,代码来源:mainframe.php

示例9: StaffWidgets

function StaffWidgets($item, &$myextra = NULL)
{
    global $extra, $_ROSARIO, $RosarioModules;
    if (isset($myextra)) {
        $extra =& $myextra;
    }
    if (!is_array($_ROSARIO['StaffWidgets'])) {
        $_ROSARIO['StaffWidgets'] = array();
    }
    if (!is_array($extra['functions'])) {
        $extra['functions'] = array();
    }
    if ((User('PROFILE') == 'admin' || User('PROFILE') == 'teacher') && !$_ROSARIO['StaffWidgets'][$item]) {
        switch ($item) {
            case 'all':
                //modif Francois: css WPadmin
                //				$extra['search'] .= '<TR><TD>';
                $extra['search'] .= '<TR><TD><TABLE style="border-collapse:separate; border-spacing:2px" class="width-100p cellpadding-2">';
                if ($RosarioModules['Users'] && !$_ROSARIO['StaffWidgets']['permissions']) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'users_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="users_table_arrow" height="12"> <B>' . _('Users') . '</B></A><BR /><TABLE id="users_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    StaffWidgets('permissions', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                if ($RosarioModules['Food_Service'] && (!$_ROSARIO['StaffWidgets']['fsa_balance'] || !$_ROSARIO['StaffWidgets']['fsa_status'] || !$_ROSARIO['StaffWidgets']['fsa_barcode'])) {
                    $extra['search'] .= '<TR><TD colspan="2">&nbsp;<A onclick="switchMenu(\'food_service_table\');" href="#"><IMG SRC="assets/arrow_right.gif" id="food_service_table_arrow" height="12"> <B>' . _('Food Service') . '</B></A><BR /><TABLE id="food_service_table" style="display:none;" class="widefat width-100p cellspacing-0">';
                    StaffWidgets('fsa_balance', $extra);
                    StaffWidgets('fsa_status', $extra);
                    StaffWidgets('fsa_barcode', $extra);
                    StaffWidgets('fsa_exists', $extra);
                    $extra['search'] .= '</TABLE></TD></TR>';
                }
                $extra['search'] .= '</TABLE></TD></TR>';
                break;
            case 'user':
                $widgets_RET = DBGet(DBQuery("SELECT TITLE FROM PROGRAM_USER_CONFIG WHERE USER_ID='" . User('STAFF_ID') . "' AND PROGRAM='StaffWidgetsSearch'" . (count($_ROSARIO['StaffWidgets']) ? " AND TITLE NOT IN ('" . implode("','", array_keys($_ROSARIO['StaffWidgets'])) . "')" : '')));
                foreach ($widgets_RET as $widget) {
                    StaffWidgets($widget['TITLE'], $extra);
                }
                break;
            case 'permissions_Y':
            case 'permissions_N':
                $value = mb_substr($item, 12);
                $item = 'permissions';
            case 'permissions':
                if ($RosarioModules['Users']) {
                    if ($_REQUEST['permissions']) {
                        $extra['WHERE'] .= " AND s.PROFILE_ID IS " . ($_REQUEST['permissions'] == 'Y' ? 'NOT' : '') . " NULL AND s.PROFILE!='none'";
                        if (!$extra['NoSearchTerms']) {
                            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Permissions')) . ' </b></span>' . ($_REQUEST['permissions'] == 'Y' ? _('Profile') : _('Custom')) . '<BR />';
                        }
                    }
                    //modif Francois: add <label> on radio
                    $extra['search'] .= '<TR><TD style="text-align:right; width:120px:">' . _('Permissions') . '</TD><TD><label><INPUT type="radio" name="permissions" value=""' . (!$value ? ' checked' : '') . '> ' . _('All') . '</label> &nbsp;<label><INPUT type="radio" name="permissions" value="Y"' . ($value == 'Y' ? ' checked' : '') . '> ' . _('Profile') . '</label> &nbsp;<label><INPUT type="radio" name="permissions" value="N"' . ($value == 'N' ? ' checked' : '') . '> ' . _('Custom') . '</label></TD></TR>';
                }
                break;
            case 'fsa_balance_warning':
                $value = $GLOBALS['warning'];
                $item = 'fsa_balance';
            case 'fsa_balance':
                if ($RosarioModules['Food_Service']) {
                    if ($_REQUEST['fsa_balance'] != '') {
                        if (!mb_strpos($extra['FROM'], 'fssa')) {
                            $extra['FROM'] .= ',FOOD_SERVICE_STAFF_ACCOUNTS fssa';
                            $extra['WHERE'] .= ' AND fssa.STAFF_ID=s.STAFF_ID';
                        }
                        $extra['WHERE'] .= " AND fssa.BALANCE" . ($_REQUEST['fsa_bal_gt'] == 'Y' ? '>=' : '<') . "'" . round($_REQUEST['fsa_balance'], 2) . "'";
                        if (!$extra['NoSearchTerms']) {
                            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Food Service Balance')) . ' </b></span><span class="sizep2">' . ($_REQUEST['fsa_bal_ge'] == 'Y' ? '&ge;' : '&lt;') . '</span>' . number_format($_REQUEST['fsa_balance'], 2) . '<BR />';
                        }
                    }
                    $extra['search'] .= '<TR><TD style="text-align:right; width:120px:">' . _('Balance') . '</TD><TD><table class="cellpadding-0 cellspacing-0"><tr><td><label><span class="sizep2">&lt;</span> <INPUT type="radio" name="fsa_bal_ge" value="" checked /></label></td><td rowspan="2"><INPUT type="text" name="fsa_balance" size="10"' . ($value ? ' value="' . $value . '"' : '') . '></td></tr><tr><td><label><span class="sizep2">&ge;</span> <INPUT type="radio" name="fsa_bal_ge" value="Y"></label></td></tr></table></TD></TR>';
                }
                break;
            case 'fsa_status_active':
                $value = 'active';
                $item = 'fsa_status';
            case 'fsa_status':
                if ($RosarioModules['Food_Service']) {
                    if ($_REQUEST['fsa_status']) {
                        if (!mb_strpos($extra['FROM'], 'fssa')) {
                            $extra['FROM'] .= ',FOOD_SERVICE_STAFF_ACCOUNTS fssa';
                            $extra['WHERE'] .= ' AND fssa.STAFF_ID=s.STAFF_ID';
                        }
                        if ($_REQUEST['fsa_status'] == 'Active') {
                            $extra['WHERE'] .= ' AND fssa.STATUS IS NULL';
                        } else {
                            $extra['WHERE'] .= ' AND fssa.STATUS=\'' . $_REQUEST['fsa_status'] . '\'';
                        }
                        if (!$extra['NoSearchTerms']) {
                            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Food Service Status')) . ' </b></span>' . $_REQUEST['fsa_status'] . '<BR />';
                        }
                    }
                    $extra['search'] .= '<TR><TD style="text-align:right; width:120px:">' . _('Account Status') . '</TD><TD><SELECT name="fsa_status"><OPTION value="">' . _('Not Specified') . '</OPTION><OPTION value="Active"' . ($value == 'active' ? ' SELECTED="SELECTED"' : '') . '>' . _('Active') . '</OPTION><OPTION value="Inactive">' . _('Inactive') . '</OPTION><OPTION value="Disabled">' . _('Disabled') . '</OPTION><OPTION value="Closed">' . _('Closed') . '</OPTION></SELECT></TD></TR>';
                }
                break;
            case 'fsa_barcode':
                if ($RosarioModules['Food_Service']) {
                    if ($_REQUEST['fsa_barcode']) {
                        if (!mb_strpos($extra['FROM'], 'fssa')) {
                            $extra['FROM'] .= ',FOOD_SERVICE_STAFF_ACCOUNTS fssa';
//.........这里部分代码省略.........
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:101,代码来源:StaffWidgets.fnc.php

示例10: _makePublishing

function _makePublishing($value, $name)
{
    global $THIS_RET, $profiles_RET;
    if ($THIS_RET['ID']) {
        $id = $THIS_RET['ID'];
    } else {
        $id = 'new';
    }
    //modif Francois: remove LO_field
    $return = '<TABLE class="cellpadding-0 cellspacing-0"><TR><TD><b>' . Localize('colon', _('Visible Between')) . '</b></TD><TD style="text-align:right">';
    $return .= DateInput($value, "values[{$id}][{$name}]") . '</TD><TD> ' . _('to') . ' </TD><TD>';
    $return .= DateInput($THIS_RET['END_DATE'], "values[{$id}][END_DATE]") . '</TD></TR>';
    //modif Francois: css WPadmin
    $return .= '<TR><TD colspan="4" style="padding:0">';
    if (!$profiles_RET) {
        $profiles_RET = DBGet(DBQuery("SELECT ID,TITLE FROM USER_PROFILES ORDER BY ID WHERE"));
    }
    $return .= '<TABLE class="width-100p cellspacing-0 cellpadding-0"><TR><TD colspan="4"><b>' . Localize('colon', _('Visible To')) . '</b></TD></TR><TR>';
    foreach (array('admin' => _('Administrator w/Custom'), 'teacher' => _('Teacher w/Custom'), 'parent' => _('Parent w/Custom')) as $profile_id => $profile) {
        //modif Francois: add <label> on checkbox
        $return .= '<TD><label><INPUT type="checkbox" name="profiles[$id][' . $profile_id . ']" value="Y"' . (mb_strpos($THIS_RET['PUBLISHED_PROFILES'], ",{$profile_id},") !== false ? ' checked' : '') . ' /> ' . $profile . '</label></TD>';
    }
    //modif Francois: Portal Polls add students teacher
    $teachers_RET = DBGet(DBQuery("SELECT STAFF_ID,LAST_NAME,FIRST_NAME,MIDDLE_NAME FROM STAFF WHERE (SCHOOLS IS NULL OR STRPOS(SCHOOLS,'," . UserSchool() . ",')>0) AND SYEAR='" . UserSyear() . "' AND PROFILE='teacher' ORDER BY LAST_NAME,FIRST_NAME"));
    if (count($teachers_RET)) {
        foreach ($teachers_RET as $teacher) {
            $teachers[$teacher['STAFF_ID']] = $teacher['LAST_NAME'] . ', ' . $teacher['FIRST_NAME'];
        }
    }
    $i = 0;
    foreach ($profiles_RET as $profile) {
        $i++;
        if ($profile['ID'] == 0) {
            //student
            $return .= '</TR><TR>';
        }
        $return .= '<TD><label><INPUT type="checkbox" name="profiles[' . $id . '][' . $profile['ID'] . ']" value="Y"' . (mb_strpos($THIS_RET['PUBLISHED_PROFILES'], ",{$profile['ID']},") !== false ? ' checked' : '') . ' /> ' . _($profile['TITLE']);
        //modif Francois: Portal Polls add students teacher
        if ($profile['ID'] == 0) {
            $return .= ': </label></TD>';
            $return .= '<TD colspan="2">' . SelectInput($THIS_RET['STUDENTS_TEACHER_ID'], 'values[' . $id . '][STUDENTS_TEACHER_ID]', _('Limit to Teacher'), $teachers, true, '', true) . '</TD>';
            $i = $i + 2;
        } else {
            $return .= '</label></TD>';
        }
        if ($i % 3 == 0 && $i != count($profile)) {
            $return .= '</TR><TR>';
        }
    }
    for (; $i % 3 != 0; $i++) {
        $return .= '<TD>&nbsp;</TD>';
    }
    $return .= '</TR>';
    $return .= '</TABLE>';
    $return .= '</TD></TR></TABLE>';
    return $return;
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:57,代码来源:PortalPolls.php

示例11: _makePeriod

function _makePeriod($value, $column)
{
    global $THIS_RET;
    return ($value ? Localize('colon', _('On')) . ' ' . GetPeriod($value) : '') . ($THIS_RET['NOT_PERIOD_ID'] ? ($value ? '<BR />' : '') . Localize('colon', _('Not on')) . ' ' . GetPeriod($THIS_RET['NOT_PERIOD_ID']) : '');
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:5,代码来源:UnfilledRequests.php

示例12: appendSQL

function appendSQL($sql, $extra = array())
{
    global $_ROSARIO;
    if ($_REQUEST['stuid']) {
        //modif Francois: allow comma separated list of student IDs
        $stuid_array = explode(',', $_REQUEST['stuid']);
        $stuids = array();
        foreach ($stuid_array as $stuid) {
            if (is_numeric($stuid)) {
                $stuids[] = $stuid;
            }
        }
        if (!empty($stuids)) {
            $stuids = implode(',', $stuids);
            //$sql .= " AND ssm.STUDENT_ID IN '".$_REQUEST['stuid']."'";
            $sql .= " AND ssm.STUDENT_ID IN (" . $stuids . ")";
            if (!$extra['NoSearchTerms']) {
                $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('RosarioSIS ID')) . ' </b></span>' . $stuids . '<BR />';
            }
        }
    }
    if ($_REQUEST['last']) {
        $sql .= " AND LOWER(s.LAST_NAME) LIKE '" . mb_strtolower($_REQUEST['last']) . "%'";
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Last Name starts with')) . ' </b></span>' . str_replace("''", "'", $_REQUEST['last']) . '<BR />';
        }
    }
    if ($_REQUEST['first']) {
        $sql .= " AND LOWER(s.FIRST_NAME) LIKE '" . mb_strtolower($_REQUEST['first']) . "%'";
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('First Name starts with')) . ' </b></span>' . str_replace("''", "'", $_REQUEST['first']) . '<BR />';
        }
    }
    if ($_REQUEST['grade']) {
        $sql .= " AND ssm.GRADE_ID = '{$_REQUEST['grade']}'";
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Grade Level')) . ' </b></span>' . GetGrade($_REQUEST['grade']) . '<BR />';
        }
    }
    if (count($_REQUEST['grades'])) {
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', ngettext('Grade', 'Grades', sizeof($_REQUEST['grades']))) . ' </b></span>' . ($_REQUEST['grades_not'] == 'Y' ? _('Excluded') . ' ' : '');
        }
        $list = $sep = '';
        foreach ($_REQUEST['grades'] as $id => $y) {
            $list .= "{$sep}'{$id}'";
            if (!$extra['NoSearchTerms']) {
                $_ROSARIO['SearchTerms'] .= $sep . GetGrade($id);
            }
            $sep = ',';
        }
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<BR />';
        }
        $sql .= " AND ssm.GRADE_ID " . ($_REQUEST['grades_not'] == 'Y' ? 'NOT ' : '') . " IN ({$list})";
    }
    if ($_REQUEST['addr']) {
        $sql .= " AND (LOWER(a.ADDRESS) LIKE '%" . mb_strtolower($_REQUEST['addr']) . "%' OR LOWER(a.CITY) LIKE '" . mb_strtolower($_REQUEST['addr']) . "%' OR LOWER(a.STATE)='" . mb_strtolower($_REQUEST['addr']) . "' OR ZIPCODE LIKE '" . $_REQUEST['addr'] . "%')";
        if (!$extra['NoSearchTerms']) {
            $_ROSARIO['SearchTerms'] .= '<span style="color:gray"><b>' . Localize('colon', _('Address contains')) . ' </b></span>' . str_replace("''", "'", $_REQUEST['addr']) . '<BR />';
        }
    }
    return $sql;
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:64,代码来源:GetStuList.fnc.php

示例13: reminder

function reminder($student, $teacher, $xstudents, $target, $last_deposit, $note)
{
    $payment = $target - $student['BALANCE'];
    if ($_REQUEST['year_end'] == 'Y') {
        $payment = floor($payment * 2 + 0.99) / 2;
    }
    if ($payment <= 0) {
        return;
    }
    $payment = number_format($payment, 2);
    echo '<TABLE class="width-100p">';
    echo '<TR><TD colspan="3" class="center"><span class="sizep1"><I><B>* * * ' . ($_REQUEST['year_end'] == 'Y' ? _('Year End') . ' ' : '') . _('Lunch Payment Reminder') . ' * * *</B></I></span></TD></TR>';
    echo '<TR><TD colspan="3" class="center"><B>' . $student['SCHOOL'] . '</B></TD></TR>';
    echo '<TR><TD style="width:33%;">';
    echo ($student['NICKNAME'] ? $student['NICKNAME'] : $student['FIRST_NAME']) . ' ' . $student['LAST_NAME'] . '<BR />';
    echo '' . $student['STUDENT_ID'] . '';
    if (count($xstudents)) {
        echo '<BR />' . Localize('colon', _('Other students on this account'));
        foreach ($xstudents as $xstudent) {
            echo '<BR />&nbsp;&nbsp;' . ($xstudent['NICKNAME'] ? $xstudent['NICKNAME'] : $xstudent['FIRST_NAME']) . ' ' . $xstudent['LAST_NAME'];
        }
        echo '';
    }
    echo '</TD><TD style="width:33%;">';
    echo $student['GRADE'] . '<BR />';
    echo 'Grade';
    echo '</TD><TD style="width:33%;">';
    echo $teacher['FULL_NAME'] . '<BR />';
    echo '' . $teacher['TITLE'] . ' ' . _('Teacher') . '';
    echo '</TD></TR>';
    echo '<TR><TD style="width:33%;">';
    echo ProperDate(DBDate()) . '<BR />';
    echo '' . _('Today\'s Date') . '';
    echo '</TD><TD style="width:34%;">';
    echo ($last_deposit ? $last_deposit['DATE'] : _('None')) . '<BR />';
    echo '' . _('Date of Last Deposit') . '';
    echo '</TD><TD style="width:33%;">';
    echo ($last_deposit ? $last_deposit['AMOUNT'] : _('None')) . '<BR />';
    echo '' . _('Amount of Last Deposit') . '';
    echo '</TD></TR>';
    echo '<TR><TD style="width:33%;">';
    echo ($student['BALANCE'] < 0 ? '<B>' . Currency($student['BALANCE']) . '</B>' : Currency($student['BALANCE'])) . '<BR />';
    echo '' . _('Balance') . '';
    echo '</TD><TD style="width:34%;">';
    echo '<B>' . Currency($payment) . '</B><BR />';
    echo '<B>' . ($_REQUEST['year_end'] == 'Y' ? _('Requested Payment') : _('Mimimum Payment')) . ' </B>';
    echo '</TD><TD style="width:33%;">';
    echo $student['ACCOUNT_ID'] . '<BR />';
    echo '' . _('Account ID') . '';
    echo '</TD></TR>';
    $note = str_replace('%N', $student['NICKNAME'] ? $student['NICKNAME'] : $student['FIRST_NAME'], $note);
    $note = str_replace('%F', $student['FIRST_NAME'], $note);
    $note = str_replace('%g', $student['GENDER'] ? mb_substr($student['GENDER'], 0, 1) == 'F' ? 'she' : 'he' : 'he/she', $note);
    $note = str_replace('%G', $student['GENDER'] ? mb_substr($student['GENDER'], 0, 1) == 'F' ? 'She' : 'He' : 'He/she', $note);
    $note = str_replace('%h', $student['GENDER'] ? mb_substr($student['GENDER'], 0, 1) == 'F' ? 'her' : 'his' : 'his/her', $note);
    $note = str_replace('%H', $student['GENDER'] ? mb_substr($student['GENDER'], 0, 1) == 'F' ? 'Her' : 'His' : 'His/her', $note);
    //	$note = str_replace('%P',money_format('%i',$payment),$note);
    $note = str_replace('%P', Currency($payment), $note);
    $note = str_replace('%T', $target, $note);
    echo '<TR><TD colspan="3">';
    echo '<BR />' . $note . '<BR />';
    echo '</TD></TR>';
    echo '<TR><TD colspan="3"><BR /><BR /><HR><BR /><BR /></TD></TR></TABLE>';
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:64,代码来源:Reminders.php

示例14: array_keys

$keys = array_keys($language);
usort($keys, function ($a, $b) {
    return strlen($b) - strlen($a);
});
IncludeJSBlock('

window.Language.Instance=new Language({' . "\n" . implode(",\n", array_map(function ($k) use($language) {
    return '  ' . json_encode($k) . ':' . json_encode($language[$k]);
}, $keys)) . "\n" . '});

');
Core::LibDir() . DS . 'easycsv' . DS . 'EasyCsv.php';
//print_r($language);
Localize(function () {
    Scaffold('scheduled.workspace');
    Scaffold('addendum.workspace');
    Scaffold('quarterly.workspace');
}, $language);
Scaffold('list.scheduled');
$q = (int) ((date('n') - 1) / 3);
$quarters = array('1st', '2nd', '3rd', '4th');
$quarter = $quarters[$q];
IncludeJSBlock('

    window.addEvent("load",function(){

        var ajaxUrl=' . json_encode($params['url']) . ';

        UIFormManager.setAjaxUrl(ajaxUrl);

开发者ID:nickolanack,项目名称:rwae-forms,代码行数:29,代码来源:user.panel.php

示例15: DBGet

 }
 $events_RET = DBGet(DBQuery("SELECT ce.TITLE,ce.DESCRIPTION,ce.SCHOOL_DATE,to_char(ce.SCHOOL_DATE,'Dy') AS DAY,s.TITLE AS SCHOOL FROM CALENDAR_EVENTS ce,SCHOOLS s WHERE ce.SCHOOL_DATE BETWEEN CURRENT_DATE AND CURRENT_DATE+6 AND ce.SYEAR='" . UserSyear() . "' AND position(','||ce.SCHOOL_ID||',' IN (SELECT SCHOOLS FROM STAFF WHERE STAFF_ID='" . User('STAFF_ID') . "'))>0 AND s.ID=ce.SCHOOL_ID AND s.SYEAR=ce.SYEAR ORDER BY ce.SCHOOL_DATE,s.TITLE"), array('SCHOOL_DATE' => 'ProperDate'), array('SCHOOL_DATE'));
 if (count($events_RET)) {
     echo '<p>';
     ListOutput($events_RET, array('DAY' => _('Day'), 'SCHOOL_DATE' => _('Date'), 'TITLE' => _('Event'), 'DESCRIPTION' => _('Description'), 'SCHOOL' => _('School')), _('Day With Upcoming Events'), _('Days With Upcoming Events'), array(), array('SCHOOL_DATE'), array('save' => false, 'search' => false));
     echo '</p>';
 }
 if (Preferences('HIDE_ALERTS') != 'Y') {
     // warn if missing attendances
     $categories_RET = DBGet(DBQuery("SELECT '0' AS ID,'Attendance' AS TITLE,0,NULL AS SORT_ORDER UNION SELECT ID,TITLE,1,SORT_ORDER FROM ATTENDANCE_CODE_CATEGORIES WHERE SYEAR='" . UserSyear() . "' AND SCHOOL_ID='" . UserSchool() . "' ORDER BY 3,SORT_ORDER"));
     foreach ($categories_RET as $category) {
         $daysWeek = _('SuMoTuWeThFrSa');
         /// Days of the week
         $RET = DBGET(DBQuery("SELECT cp.COURSE_PERIOD_ID,acc.SCHOOL_DATE,cp.TITLE FROM ATTENDANCE_CALENDAR acc,COURSE_PERIODS cp,SCHOOL_PERIODS sp WHERE acc.SYEAR='" . UserSyear() . "' AND (acc.MINUTES IS NOT NULL AND acc.MINUTES>0) AND cp.SCHOOL_ID=acc.SCHOOL_ID AND cp.SYEAR=acc.SYEAR AND acc.SCHOOL_DATE<'" . DBDate() . "' AND cp.CALENDAR_ID=acc.CALENDAR_ID AND cp.TEACHER_ID='" . User('STAFF_ID') . "'\n            AND cp.MARKING_PERIOD_ID IN (SELECT MARKING_PERIOD_ID FROM SCHOOL_MARKING_PERIODS WHERE MP='FY' AND SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE UNION SELECT MARKING_PERIOD_ID FROM SCHOOL_MARKING_PERIODS WHERE MP='SEM' AND SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE UNION SELECT MARKING_PERIOD_ID FROM SCHOOL_MARKING_PERIODS WHERE MP='QTR' AND SCHOOL_ID=acc.SCHOOL_ID AND acc.SCHOOL_DATE BETWEEN START_DATE AND END_DATE)\n\t\t\tAND sp.PERIOD_ID=cp.PERIOD_ID AND (sp.BLOCK IS NULL AND position(substring('{$daysWeek}' FROM cast(extract(DOW FROM acc.SCHOOL_DATE) AS INT)*2+1 FOR 2) IN cp.DAYS)>0\n\t\t\t\tOR sp.BLOCK IS NOT NULL AND acc.BLOCK IS NOT NULL AND sp.BLOCK=acc.BLOCK)\n\t\t\tAND NOT exists(SELECT '' FROM ATTENDANCE_COMPLETED ac WHERE ac.SCHOOL_DATE=acc.SCHOOL_DATE AND ac.STAFF_ID=cp.TEACHER_ID AND ac.PERIOD_ID=cp.PERIOD_ID AND TABLE_NAME='{$category['ID']}') AND position(',{$category['ID']},' IN cp.DOES_ATTENDANCE)>0 ORDER BY cp.TITLE,acc.SCHOOL_DATE"), array('SCHOOL_DATE' => 'ProperDate'), array('COURSE_PERIOD_ID'));
         if (count($RET)) {
             echo '<p><font color=red><b>' . _('Warning!') . '</b></font> - ' . sprintf(Localize('colon', _('You have missing <b>%s</b> attendance data')), $category['TITLE']);
             ListOutput($RET, array('SCHOOL_DATE' => _('Date'), 'TITLE' => _('Period - Teacher')), sprintf(_('Period with missing %s attendance data'), $category['TITLE']), sprintf(_('Periods with missing %s attendance data'), $category['TITLE']), array(), array('COURSE_PERIOD_ID'), array('save' => false, 'search' => false));
             echo '</p>';
         }
     }
 }
 if ($CentreModules['Food_Service'] && Preferences('HIDE_ALERTS') != 'Y') {
     // warn if negative food service balance
     $staff = DBGet(DBQuery('SELECT (SELECT STATUS FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS STATUS,(SELECT BALANCE FROM FOOD_SERVICE_STAFF_ACCOUNTS WHERE STAFF_ID=s.STAFF_ID) AS BALANCE FROM STAFF s WHERE s.STAFF_ID=' . User('STAFF_ID')));
     $staff = $staff[1];
     if ($staff['BALANCE'] && $staff['BALANCE'] < 0) {
         echo '<p><font color=red><b>' . _('Warning!') . '</b></font> - ' . sprintf(_('You have a <b>negative</b> food service balance of <font color=red>%s</font>'), $staff['BALANCE']) . '</p>';
     }
 }
 echo '<p>&nbsp;' . _('Happy teaching...') . '</p>';
 break;
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:Portal.php


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