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


PHP Preferences函数代码示例

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


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

示例1: ProperDate

function ProperDate($date = '', $length = 'long')
{
    $months_number['JAN'] = '1';
    $months_number['FEB'] = '2';
    $months_number['MAR'] = '3';
    $months_number['APR'] = '4';
    $months_number['MAY'] = '5';
    $months_number['JUN'] = '6';
    $months_number['JUL'] = '7';
    $months_number['AUG'] = '8';
    $months_number['SEP'] = '9';
    $months_number['OCT'] = '10';
    $months_number['NOV'] = '11';
    $months_number['DEC'] = '12';
    if ($date && strlen($date) == 9) {
        $year = substr($date, 7);
        $month = $months_number[strtoupper(substr($date, 3, 3))];
        $day = substr($date, 0, 2) * 1;
        $comment = '<!-- ' . ($year < 50 ? 20 : 19) . $year . MonthNWSwitch(substr($date, 3, 3), 'tonum') . substr($date, 0, 2) . ' -->';
    } elseif ($date) {
        $year = substr($date, 0, 4);
        $month = substr($date, 5, 2) * 1;
        $day = substr($date, 8) * 1;
        $comment = '<!-- ' . $year . substr($date, 5, 2) . substr($date, 8) . ' -->';
    }
    if ((Preferences('MONTH') == 'm' || Preferences('MONTH') == 'M') && (Preferences('DAY') == 'j' || Preferences('DAY') == 'd') && Preferences('YEAR')) {
        $sep = '/';
    } else {
        $sep = ' ';
    }
    if ($date) {
        return date(($length == 'long' || Preferences('MONTH') != 'F' ? Preferences('MONTH') : 'M') . $sep . Preferences('DAY') . $sep . Preferences('YEAR'), mktime(0, 0, 0, $month, $day, $year));
    }
}
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:34,代码来源:ProperDate.fnc.php

示例2: ProperDate

function ProperDate($date = '', $length = 'long')
{
    if ($date) {
        if (mb_strlen($date) == 9) {
            $months_number = array('JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12');
            $year = mb_substr($date, 7, 2);
            $year = ($year < 50 ? '20' : '19') . $year;
            $month = $months_number[mb_strtoupper(mb_substr($date, 3, 3))];
            $day = mb_substr($date, 0, 2);
        } elseif (mb_strlen($date) == 10) {
            $year = mb_substr($date, 0, 4);
            $month = mb_substr($date, 5, 2);
            $day = mb_substr($date, 8, 2);
        } else {
            $months_number = array('JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12');
            $year = mb_substr($date, 7, 4);
            $day = mb_substr($date, 0, 2);
            $month = $months_number[mb_strtoupper(mb_substr($date, 3, 3))];
        }
        $comment = '<!-- ' . $year . $month . $day . ' -->';
        if (!empty($_REQUEST['_ROSARIO_PDF']) && $_REQUEST['LO_save'] && Preferences('E_DATE') == 'MM/DD/YYYY') {
            return $comment . $month . '/' . $day . '/' . $year;
        }
        //modif Francois: display locale with strftime()
        //	if((Preferences('MONTH')=='m' || Preferences('MONTH')=='M') && (Preferences('DAY')=='j' || Preferences('DAY')=='d') && Preferences('YEAR'))
        if ((Preferences('MONTH') == '%m' || Preferences('MONTH') == '%b') && Preferences('DAY') == '%d' && Preferences('YEAR')) {
            $sep = '/';
        } else {
            $sep = ' ';
        }
        //modif Francois: display locale with strftime()
        return $comment . mb_convert_case(iconv('', 'UTF-8', strftime(($length == 'long' || Preferences('MONTH') != '%B' ? Preferences('MONTH') : '%b') . $sep . Preferences('DAY') . $sep . Preferences('YEAR'), mktime(0, 0, 0, $month + 0, $day + 0, $year + 0))), MB_CASE_TITLE, "UTF-8");
        //	return $comment.date((($length=='long' || Preferences('MONTH')!='F')?Preferences('MONTH'):'M').$sep.Preferences('DAY').$sep.Preferences('YEAR'),mktime(0,0,0,$month+0,$day+0,$year+0));
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:35,代码来源:ProperDate.fnc.php

示例3: ProperDate

function ProperDate($date = '', $length = 'long')
{
    if ($date) {
        if (strlen($date) == 9) {
            $months_number = array('JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12');
            $year = substr($date, 7, 2);
            $year = ($year < 50 ? '20' : '19') . $year;
            $month = $months_number[strtoupper(substr($date, 3, 3))];
            $day = substr($date, 0, 2);
        } elseif (strlen($date) == 10) {
            $year = substr($date, 0, 4);
            $month = substr($date, 5, 2);
            $day = substr($date, 8, 2);
        } else {
            $months_number = array('JAN' => '01', 'FEB' => '02', 'MAR' => '03', 'APR' => '04', 'MAY' => '05', 'JUN' => '06', 'JUL' => '07', 'AUG' => '08', 'SEP' => '09', 'OCT' => '10', 'NOV' => '11', 'DEC' => '12');
            $year = substr($date, 7, 4);
            $day = substr($date, 0, 2);
            $month = $months_number[strtoupper(substr($date, 3, 3))];
        }
        $comment = '<!-- ' . $year . $month . $day . ' -->';
        if (isset($_REQUEST['_CENTRE_PDF']) && $_REQUEST['_CENTRE_PDF'] && $_REQUEST['LO_save'] && Preferences('E_DATE') == 'MM/DD/YYYY') {
            return $comment . $month . '/' . $day . '/' . $year;
        }
        if ((Preferences('MONTH') == 'm' || Preferences('MONTH') == 'M') && (Preferences('DAY') == 'j' || Preferences('DAY') == 'd') && Preferences('YEAR')) {
            $sep = '/';
        } else {
            $sep = ' ';
        }
        return $comment . date(($length == 'long' || Preferences('MONTH') != 'F' ? Preferences('MONTH') : 'M') . $sep . Preferences('DAY') . $sep . Preferences('YEAR'), mktime(0, 0, 0, $month + 0, $day + 0, $year + 0));
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:31,代码来源:ProperDate.fnc.php

示例4: DrawHeader

function DrawHeader($left = '', $right = '', $center = '')
{
    global $_CENTRE;
    if (!isset($_CENTRE['DrawHeader'])) {
        $_CENTRE['DrawHeader'] = 'bgcolor=' . Preferences('HEADER');
        if ($_CENTRE['HeaderIcon']) {
            $left = '<IMG src=assets/icons/' . $_CENTRE['HeaderIcon'] . ' height=20 border=0 align=absmiddle> ' . $left;
        }
    }
    if ($_CENTRE['DrawHeader'] == 'bgcolor=' . Preferences('HEADER')) {
        $attribute = 'B';
        $font_color = '#FFFFFF';
    } else {
        $attribute = 'FONT size=-1';
        $font_color = '#000000';
    }
    echo '<TABLE width=100% border=0 cellpadding=0 cellspacing=0><TR>';
    if ($left) {
        echo '<TD ' . $_CENTRE['DrawHeader'] . ' align=left>&nbsp;<font color=' . $font_color . '><' . $attribute . '>' . $left . '</' . substr($attribute, 0, 4) . '></font></TD>';
    }
    if ($center) {
        echo '<TD ' . $_CENTRE['DrawHeader'] . ' align=center><font color=' . $font_color . '><' . $attribute . '>' . $center . '</' . $attribute . '></font></TD>';
    }
    if ($right) {
        echo '<TD ' . $_CENTRE['DrawHeader'] . ' align=right><font color=' . $font_color . '><' . $attribute . '>' . $right . '</' . substr($attribute, 0, 4) . '></font></TD>';
    }
    echo '</TR></TABLE>';
    if ($_CENTRE['DrawHeader'] == 'bgcolor=' . Preferences('HEADER')) {
        $_CENTRE['DrawHeader'] = 'bgcolor=#FFFFFF style="border:1;border-style: none none solid none;"';
    } else {
        $_CENTRE['DrawHeader'] = 'bgcolor=#F0F0F1 style="border:1;border-style: none none solid none;"';
    }
}
开发者ID:linil,项目名称:centreSIS,代码行数:33,代码来源:DrawHeader.fnc.php

示例5: PopTable

function PopTable($action, $title = 'Search', $table_att = '', $cell_padding = '5')
{
    global $_ROSARIO;
    if ($action == 'header') {
        //modif Francois: css WPadmin
        if (!empty($_REQUEST['_ROSARIO_PDF'])) {
            echo '<TABLE class="cellpadding-6" ' . $table_att . '>';
            echo '<TR><TD class="width-100p center" style="background-color:' . Preferences('HEADER') . ';">';
        } else {
            echo '<TABLE class="postbox cellspacing-0 cellpadding-0" ' . $table_att . '>';
            echo '<TR><TD class="center">';
        }
        if (is_array($title)) {
            echo WrapTabs($title, $_ROSARIO['selected_tab']);
        } else {
            echo DrawTab($title);
        }
        echo '</TD></TR>
		<TR><TD>';
        // Start content table.
        echo '<TABLE style="padding:' . $cell_padding . 'px;" class="width-100p cellspacing-0"><tr><td>';
    } elseif ($action == 'footer') {
        // Close embeded table.
        echo '</td></tr></TABLE>';
        echo '</TD>
		</TR>
		</TABLE>';
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:29,代码来源:PopTable.php

示例6: Warehouse

    function Warehouse($mode)
    {
        global $__SHOW_FOOTER, $_CENTRE, $CentreTitle;
        switch ($mode) {
            case 'header':
                echo '<HTML' . (substr($_SESSION['locale'], 0, 2) == 'he' ? ' dir="RTL"' : '') . '>';
                echo "<HEAD><TITLE>{$CentreTitle}</TITLE>";
                echo "<meta http-equiv=\"Content-Type\" content=\"text/html;charset=utf-8\" />";
                if (basename($_SERVER['PHP_SELF']) != 'index.php') {
                    echo "<noscript><META http-equiv=REFRESH content='0;url=index.php?modfunc=logout&reason=javascript' /></noscript>";
                }
                echo "<script language=\"JavaScript\" type=\"text/javascript\">";
                if (basename($_SERVER['PHP_SELF']) == 'index.php') {
                    echo "\n\t\t\t\t\t\t\tif(parent.frames.length > 0)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tparent.location.href = 'index.php?modfunc=logout';\n\t\t\t\t\t\t\t}";
                }
                echo "\n\t\t\t\t\t\t\tvar locked;\n\t\t\t\t\t\t\tfunction doOnload()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar layer;\n\t\t\t\t\t\t\t\tif(layer = document.getElementById('LOx_layer'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar right,left = getLeft(1);\n\t\t\t\t\t\t\t\t\tlayer.style.left = left;\n\t\t\t\t\t\t\t\t\tlayer.style.top = 0;\n\t\t\t\t\t\t\t\t\tdocument.getElementById('LOx_table').left = left;\n\n\t\t\t\t\t\t\t\t\tfor(i=2;column = document.getElementById('LOx'+i);i++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tright = getLeft(i);\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('LO_col'+(i-1)).width = right-left-14;\n\t\t\t\t\t\t\t\t\t\tleft = right;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdocument.getElementById('LO_col'+(i-2)).width = left-getLeft(i-2)-10;\n\t\t\t\t\t\t\t\t\ttotal_width = getLeft(i-1)-getLeft(1) + 7;\n\t\t\t\t\t\t\t\t\tdocument.getElementById('LOx_table').width = total_width;\n\t\t\t\t\t\t\t\t\tif(navigator.userAgent.indexOf('Safari')==-1&&navigator.userAgent.indexOf('Microsoft Internet Explorer')==-1)\n\t\t\t\t\t\t\t\t\t\twindow.setInterval('doOnscroll()',50);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\twindow.onscroll = doOnscroll;\n\t\t\t\t\t\t\t\t\twindow.onresize = doOnresize;\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif(layer = document.getElementById('LOy_layer'))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar bottom,top = getTop(1);\n\t\t\t\t\t\t\t\t\tlayer.style.left = getLeft(1);\n\t\t\t\t\t\t\t\t\tlayer.style.top = top;\n\t\t\t\t\t\t\t\t\tdocument.getElementById('LOy_table').left = left;\n\n\t\t\t\t\t\t\t\t\tfor(i=2;row = document.getElementById('LOy'+i);i++)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tbottom = getTop(i);\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById('LO_row'+(i-1)).height = bottom-top-2;\n\t\t\t\t\t\t\t\t\t\ttop = bottom;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tdocument.getElementById('LOy_table').width = getLeft(2)-getLeft(1);\n\t\t\t\t\t\t\t\t\tif(navigator.userAgent.indexOf('Safari')==-1&&navigator.userAgent.indexOf('Microsoft Internet Explorer')==-1)\n\t\t\t\t\t\t\t\t\t\twindow.setInterval('doOnscroll()',50);\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\twindow.onscroll = doOnscroll;\n\t\t\t\t\t\t\t\t\twindow.onresize = doOnresize;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction doOnresize()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdoOnload();\n\t\t\t\t\t\t\t\tdoOnscroll();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction doOnscroll()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar layer;\n\t\t\t\t\t\t\t\tif(layer = document.getElementById(\"LOx_layer\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar pY = (window.document.body.scrollTop ? window.document.body.scrollTop : window.pageYOffset);\n\t\t\t\t\t\t\t\t\tif(pY > getListTop())\n\t\t\t\t\t\t\t\t\t\tlayer.style.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\telse if(pY < getListTop())\n\t\t\t\t\t\t\t\t\t\tlayer.style.visibility = \"hidden\";\n\t\t\t\t\t\t\t\t\tif(pY)\n\t\t\t\t\t\t\t\t\t\tlayer.style.top = (window.document.body.scrollTop ? window.document.body.scrollTop : window.pageYOffset);\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif(layer = document.getElementById(\"LOy_layer\"))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar pX = (window.document.body.scrollLeft ? window.document.body.scrollLeft : window.pageXOffset);\n\t\t\t\t\t\t\t\t\tif(pX > 0)\n\t\t\t\t\t\t\t\t\t\tlayer.style.visibility = \"visible\";\n\t\t\t\t\t\t\t\t\telse if(pX == 0)\n\t\t\t\t\t\t\t\t\t\tlayer.style.visibility = \"hidden\";\n\t\t\t\t\t\t\t\t\tif(pX)\n\t\t\t\t\t\t\t\t\t\tlayer.style.left = (window.document.body.scrollLeft ? window.document.body.scrollLeft : window.pageXOffset);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction getLeft(column_number)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar x = 0;\n\t\t\t\t\t\t\t\tif(document.layers)\n\t\t\t\t\t\t\t\t\tx = document.layers['LOx'+column_number].pageX;\n\t\t\t\t\t\t\t\telse if(document.all || document.getElementById)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar cell = document.all ? document.all['LOx'+column_number] : document.getElementById('LOx'+column_number);\n\t\t\t\t\t\t\t\t\twhile(cell)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tx += cell.offsetLeft;\n\t\t\t\t\t\t\t\t\t\tcell = cell.offsetParent;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn x-8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction getTop(row_number)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar y = 0;\n\t\t\t\t\t\t\t\tif(document.layers)\n\t\t\t\t\t\t\t\t\ty = document.layers['LOy'+row_number].pageY;\n\t\t\t\t\t\t\t\telse if(document.all || document.getElementById)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar cell = document.all ? document.all['LOy'+row_number] : document.getElementById('LOy'+row_number);\n\t\t\t\t\t\t\t\t\twhile(cell)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ty += cell.offsetTop;\n\t\t\t\t\t\t\t\t\t\tcell = cell.offsetParent;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn y-8;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction getListTop()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tvar y = 0;\n\t\t\t\t\t\t\t\tif(document.layers)\n\t\t\t\t\t\t\t\t\ty = document.layers['LOx1'].pageY;\n\t\t\t\t\t\t\t\telse if(document.all || document.getElementById)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tvar cell = document.all ? document.all['LOx1'] : document.getElementById('LOx1');\n\t\t\t\t\t\t\t\t\twhile(cell)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\ty += cell.offsetTop;\n\t\t\t\t\t\t\t\t\t\tcell = cell.offsetParent;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\treturn y;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction putFocus()\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(document.forms.length > 0)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdocument.forms[0].elements[0].focus();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction addHTML(html,id,replace)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(locked!=false)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(replace==true)\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById(id).innerHTML = html;\n\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\tdocument.getElementById(id).innerHTML = document.getElementById(id).innerHTML + html;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction changeHTML(show,hide)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(key in show)\n\t\t\t\t\t\t\t\t\tdocument.getElementById(key).innerHTML = document.getElementById(show[key]).innerHTML;\n\t\t\t\t\t\t\t\tfor(i=0;i<hide.length;i++)\n\t\t\t\t\t\t\t\t\tdocument.getElementById(hide[i]).innerHTML = '';\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction checkAll(form,value,name_like)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(value==true)\n\t\t\t\t\t\t\t\t\tchecked = true;\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\tchecked = false;\n\n\t\t\t\t\t\t\t\tfor(i=0;i<form.elements.length;i++)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(form.elements[i].type=='checkbox' && form.elements[i].name!='controller' && form.elements[i].name.substr(0,name_like.length)==name_like)\n\t\t\t\t\t\t\t\t\t\tform.elements[i].checked = checked;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfunction switchMenu(id)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(document.getElementById(id).style.display=='none')\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdocument.getElementById(id).style.display = 'block';\n\t\t\t\t\t\t\t\t\tdocument.getElementById(id+'_arrow').src = 'assets/arrow_down.gif';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tdocument.getElementById(id).style.display = 'none';\n\t\t\t\t\t\t\t\t\tdocument.getElementById(id+'_arrow').src = 'assets/arrow_right.gif';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n                            \n                            function setMLvalue(id,loc,value)\n                            {\n                                res = document.getElementById(id).value.split('|');\n                                if(loc=='') {\n                                    if (value == '') {\n                                        alert('" . _('The first translation string cannot be empty.') . "');\n                                        value = 'Something';\n                                    }\n                                    res[0] = value;\n                                } else {\n                                    found = 0;\n                                    for (i=1;i<res.length;i++) {\n                                        if (res[i].substring(0,loc.length) == loc) {\n                                            found = 1;\n                                            if (value == '') {\n                                                for (j=i+1;j<res.length;j++)\n                                                    res[j-1] = res[j];\n                                                res.pop();\n                                            } else {\n                                                res[i] = loc+':'+value;\n                                            }\n                                        }\n                                    }    \n                                    if ((found == 0) && (value != '')) res.push(loc+':'+value);\n                                }\n                                document.getElementById(id).value = res.join('|');                                \n                            }\n\t\t\t\t\t\t</script>\n\t\t\t\t\t</HEAD>\n\t\t\t\t\t<link rel=stylesheet type=text/css href=assets/themes/" . Preferences('THEME') . "/stylesheet.css>";
                echo '  <link rel="stylesheet" type="text/css" media="all" href="assets/jscalendar/calendar-blue2.css" />
  <script type="text/javascript" src="assets/jscalendar/calendar.js"></script>
  <script type="text/javascript" src="assets/jscalendar/lang/calendar-en.js"></script>
  <script type="text/javascript" src="assets/jscalendar/calendar-setup.js"></script>
  <script type="text/javascript" src="assets/js/jquery.js"></script>
  <script type="text/javascript" src="assets/js/prototype.js"></script>
  <script type="text/javascript" src="assets/js/billing.js"></script>
  <script type="text/javascript" src="assets/tipmessage/main15.js"></script>';
                break;
            case "footer":
                echo '</TD></TR></TABLE>';
                if (isset($_CENTRE['PrepareDate'])) {
                    for ($i = 1; $i <= $_CENTRE['PrepareDate']; $i++) {
                        echo '<script type="text/javascript">
							Calendar.setup({
								monthField     :    "monthSelect' . $i . '",
								dayField       :    "daySelect' . $i . '",
								yearField      :    "yearSelect' . $i . '",
								ifFormat       :    "%d-%b-%y",
								button         :    "trigger' . $i . '",
								align          :    "Tl",
								singleClick    :    true
							});
						</script>';
                    }
                }
                echo '</BODY>';
                echo '</HTML>';
                break;
        }
    }
开发者ID:linil,项目名称:centreSIS,代码行数:47,代码来源:Warehouse.php

示例7: PDFStop

function PDFStop($handle)
{
    //global $htmldocPath,$htmldocAssetsPath;
    global $wkhtmltopdfPath, $wkhtmltopdfAssetsPath, $locale;
    $handle['orientation'] = $_SESSION['orientation'];
    unset($_SESSION['orientation']);
    $html_content = ob_get_clean();
    //convert to HTML page with CSS
    $html = '<!DOCTYPE html><HTML lang="' . mb_substr($locale, 0, 2) . '" ' . (mb_substr($locale, 0, 2) == 'he' || mb_substr($locale, 0, 2) == 'ar' ? ' dir="RTL"' : '') . '><HEAD><meta charset="UTF-8" />';
    if ($handle['css']) {
        $html .= '<link rel="stylesheet" type="text/css" href="assets/themes/' . Preferences('THEME') . '/stylesheet.css" />';
    }
    //modif Francois: bugfix wkhtmltopdf screen resolution on linux
    //see: https://code.google.com/p/wkhtmltopdf/issues/detail?id=118
    $html .= '<TITLE>' . str_replace(_('Print') . ' ', '', ProgramTitle()) . '</TITLE></HEAD><BODY><div style="width:' . (!empty($handle['orientation']) && $handle['orientation'] == 'landscape' ? '1448' : '1024') . 'px">' . $html_content . '</div></BODY></HTML>';
    //modif Francois: wkhtmltopdf
    if (!empty($wkhtmltopdfPath)) {
        if (!empty($wkhtmltopdfAssetsPath)) {
            $html = str_replace('assets/', $wkhtmltopdfAssetsPath, $html);
        }
        require 'classes/Wkhtmltopdf.php';
        try {
            //indicate to create PDF in the temporary files system directory
            $wkhtmltopdf = new Wkhtmltopdf(array('path' => sys_get_temp_dir()));
            $wkhtmltopdf->setBinPath($wkhtmltopdfPath);
            if (!empty($handle['orientation']) && $handle['orientation'] == 'landscape') {
                $wkhtmltopdf->setOrientation(Wkhtmltopdf::ORIENTATION_LANDSCAPE);
            }
            if (!empty($handle['margins']) && is_array($handle['margins'])) {
                $wkhtmltopdf->setMargins($handle['margins']);
            }
            $wkhtmltopdf->setTitle(utf8_decode(str_replace(_('Print') . ' ', '', ProgramTitle())));
            //directly pass HTML code
            $wkhtmltopdf->setHtml($html);
            //MODE_EMBEDDED displays PDF in browser, MODE_DOWNLOAD forces PDF download
            $wkhtmltopdf->output(Wkhtmltopdf::MODE_EMBEDDED, str_replace(array(_('Print') . ' ', ' '), array('', '_'), utf8_decode(ProgramTitle())) . '.pdf');
        } catch (Exception $e) {
            echo $e->getMessage();
        }
    } else {
        echo $html;
    }
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:43,代码来源:PDF.fnc.php

示例8: ReportsBottomButtons

/**
 * Reports module Bottom Buttons.
 * Messaging new messages note.
 *
 * @uses Bottom.php|bottom_buttons hook
 *
 * @return true if bottom button, else false.
 */
function ReportsBottomButtons()
{
    if (!User('PROFILE') === 'admin' || !AllowEdit('Reports/SavedReports.php') || !isset($_SESSION['List_PHP_SELF'])) {
        return false;
    }
    ?>
	<a href="Modules.php?modname=Reports/SavedReports.php&amp;modfunc=new" class="BottomButton">
		<img src="assets/themes/<?php 
    echo Preferences('THEME');
    ?>
/btn/download.png" />
		<span><?php 
    echo _('Save Report');
    ?>
</span>
	</a>
	<?php 
    return true;
}
开发者ID:francoisjacquet,项目名称:Reports,代码行数:27,代码来源:functions.php

示例9: DrawRoundedRect

function DrawRoundedRect($title, $link = '', $tabcolor = '#333366', $textcolor = '#FFFFFF', $type = '', $rollover = '')
{
    if (substr($title, 0, 1) != '<') {
        $title = preg_replace("/ /", "&nbsp;", $title);
    }
    if (!$tabcolor) {
        $tabcolor = Preferences('HEADER');
    }
    $block_table .= "<table border=0 cellspacing=0 cellpadding=0>";
    $block_table .= "  <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
    $block_table .= "    <td height=5 width=5 valign=top><IMG SRC=assets/left_upper_corner.gif border=0></td><td rowspan=3 width=100% class=\"BoxHeading\" valign=middle>";
    if ($link) {
        if (is_array($rollover)) {
            $rollover = " onmouseover=\"document.getElementById('tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.backgroundColor='" . $rollover['tabcolor'] . "';document.getElementById('tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.color='" . $rollover['textcolor'] . "';\" onmouseout=\"document.getElementById('tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.backgroundColor='{$tabcolor}';document.getElementById('tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]').style.color='" . $textcolor . "';\" ";
        }
        if (!isset($_REQUEST['_CENTRE_PDF'])) {
            $block_table .= "<A HREF='{$link}' class=BoxHeading style='color:{$textcolor}' {$rollover} id=tab_link[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>" . ParseMLField($title) . "</A>";
        } else {
            $block_table .= "<font color={$textcolor} face=Verdana,Arial,sans-serif size=-2><b>" . ParseMLField($title) . "</b></font>";
        }
    } else {
        if (!isset($_REQUEST['_CENTRE_PDF'])) {
            $block_table .= "<font color={$textcolor}>" . ParseMLField($title) . "</font>";
        } else {
            $block_table .= "<font color={$textcolor} face=Verdana,Arial,sans-serif size=-2><b>" . ParseMLField($title) . "</b></font>";
        }
    }
    $block_table .= "</td><td height=5 width=5 valign=top><IMG SRC=assets/right_upper_corner.gif border=0></td>";
    $block_table .= "  </tr>";
    // MIDDLE ROW
    $block_table .= "  <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
    $block_table .= "    <td width=5>&nbsp;</td>";
    $block_table .= "<td width=5>&nbsp;</td>";
    $block_table .= "  </tr>";
    // BOTTOM ROW
    $block_table .= "  <tr style='background-color:{$tabcolor}' id=tab[" . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . "]>";
    $block_table .= "    <td height=5 width=5 valign=bottom><IMG SRC=assets/left_lower_corner.gif border=0></td>";
    $block_table .= "<td height=5 width=5 valign=bottom><IMG SRC=assets/right_lower_corner.gif border=0></td>";
    $block_table .= "  </tr>";
    $block_table .= "</table>\n";
    return $block_table;
}
开发者ID:linil,项目名称:centreSIS,代码行数:42,代码来源:DrawTab.fnc.php

示例10: DrawTab

function DrawTab($title, $link = '')
{
    $title = ParseMLField($title);
    if (mb_substr($title, 0, 1) != '<') {
        $title = str_replace(" ", "&nbsp;", $title);
    }
    /*	if(!$tabcolor)
    		$tabcolor = Preferences('HEADER');*/
    //modif Francois: css WPadmin
    if ($link && !isset($_REQUEST['_ROSARIO_PDF'])) {
        $block_table .= '<h3><A HREF="' . $link . '" class="BoxHeading" id="tab_link[' . preg_replace('/[^a-zA-Z0-9]/', '_', $link) . ']">' . _($title) . '</A></h3>';
    } else {
        if (!isset($_REQUEST['_ROSARIO_PDF'])) {
            $block_table .= '<h3>' . $title . '</h3>';
        } else {
            $block_table .= '<span class="size-1" style="color:' . Preferences('HIGHLIGHT') . '"><b>' . $title . '</b>&nbsp;</span>';
        }
    }
    return $block_table;
}
开发者ID:fabioassuncao,项目名称:rosariosis,代码行数:20,代码来源:Tabs.fnc.php

示例11: TextAreaInputOrg

function TextAreaInputOrg($value, $name, $title = '', $options = '', $div = true, $divwidth = '500px')
{
    if (Preferences('HIDDEN') != 'Y') {
        $div = false;
    }
    if (AllowEdit() && !$_REQUEST['_CENTRE_PDF']) {
        $value = str_replace("'", '&#39;', str_replace('"', '&rdquo;', $value));
        if (strpos($options, 'cols') === false) {
            $options .= ' cols=30';
        }
        if (strpos($options, 'rows') === false) {
            $options .= ' rows=4';
        }
        $rows = substr($options, strpos($options, 'rows') + 5, 2) * 1;
        $cols = substr($options, strpos($options, 'cols') + 5, 2) * 1;
        if ($value == '' || $div == false) {
            return "<TEXTAREA name={$name} {$options}>{$value}</TEXTAREA>" . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
        } else {
            return "<DIV id='div{$name}'><div style='width:500px;' onclick='javascript:addHTML(\"<TEXTAREA id=textarea{$name} name={$name} {$options}>" . ereg_replace("[\n\r]", '\\u000D\\u000A', str_replace("\r\n", '\\u000D\\u000A', str_replace("'", "&#39;", $value))) . "</TEXTAREA>" . ($title != '' ? "<BR><small>" . str_replace("'", '&#39;', (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '')) . "</small>" : '') . "\",\"div{$name}\",true); document.getElementById(\"textarea{$name}\").value=unescape(document.getElementById(\"textarea{$name}\").value);'><TABLE class=LO_field height=100%><TR><TD>" . (substr_count($value, "\r\n") > $rows ? '<DIV style="overflow:auto; height:' . 15 * $rows . 'px; width:' . $cols * 10 . '; padding-right: 16px;">' . nl2br($value) . '</DIV>' : '<DIV style="overflow:auto; width:' . $divwidth . '; padding-right: 16px;">' . nl2br($value) . '</DIV>') . '</TD></TR></TABLE>' . ($title != '' ? '<BR><small>' . str_replace("'", '&#39;', (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '')) . '</small>' : '') . '</div></DIV>';
        }
    } else {
        return ($value != '' ? nl2br($value) : '-') . ($title != '' ? '<BR><small>' . (strpos(strtolower($title), '<font ') === false ? '<FONT color=' . Preferences('TITLES') . '>' : '') . $title . (strpos(strtolower($title), '<font ') === false ? '</FONT>' : '') . '</small>' : '');
    }
}
开发者ID:SoftScape,项目名称:opensis,代码行数:24,代码来源:custom_functions.fnc.php

示例12: Preferences

         $count++;
     }
 } else {
     if ($schooldate > $end && $end != NULL && $start == $start2) {
         $URIcount++;
         //echo "$URIcount | ";
         if ($URIcount > $startrow && $URIcount < $endrow) {
             echo "<input type=hidden name=delete value=true>";
             echo "<input type=hidden name=studentidx[{$count}] value={$studentid}>";
             echo "<input type=hidden name=periodidx[{$count}] value={$courseid}>";
             echo "<input type=hidden name=schooldatex[{$count}] value={$schooldate}>";
             if ($yellow == 0) {
                 $color = 'F8F8F9';
                 $yellow++;
             } else {
                 $color = Preferences('COLOR');
                 $yellow = 0;
             }
             echo "<tr class=even><td ><input type=checkbox name=deletecheck[{$count}] value={$count}></td><td bgcolor=#{$color}><font color=#000000><FONT size=-1>{$first} {$last} ({$studentid})</td><td bgcolor=#{$color}><font color=#000000><FONT size=-1>{$short_name} ({$courseid})</td><td bgcolor=#{$color}><font color=#000000><FONT size=-1>{$start} &nbsp</td><td bgcolor=#{$color}><font color=#000000><FONT size=-1>{$end} &nbsp</td><td bgcolor=#{$color}><font color=#000000><FONT size=-1>{$schooldate}</td></tr>";
             $count++;
         }
     } else {
         //echo "<tr><td>$studentid</td><td>$courseid</td></tr>";
         $duplicate = 0;
     }
 }
 $studentid2 = $studentid;
 $courseid2 = $courseid;
 $periodid2 = $periodid;
 $schooldate2 = $schooldate;
 $first2 = $first;
开发者ID:jicheng17,项目名称:fh,代码行数:31,代码来源:DuplicateAttendance.php

示例13: _makeMultipleInput

function _makeMultipleInput($column, $name, $request = 'staff')
{
    global $value, $field, $_openSIS;
    if ((AllowEdit() || $_openSIS['allow_edit']) && !$_REQUEST['_openSIS_PDF']) {
        $field['SELECT_OPTIONS'] = str_replace("\n", "\r", str_replace("\r\n", "\r", $field['SELECT_OPTIONS']));
        $select_options = explode("\r", $field['SELECT_OPTIONS']);
        if (count($select_options)) {
            foreach ($select_options as $option) {
                $options[$option] = $option;
            }
        }
        if ($value[$column] != '') {
            echo "<DIV id='div" . $request . "[" . $column . "]'><div onclick='javascript:addHTML(\"";
        }
        echo '<TABLE border=0 cellpadding=3>';
        if (count($options) > 12) {
            echo '<TR><TD colspan=2>';
            echo '<small><FONT color=' . Preferences('TITLES') . '>' . $name . '</FONT></small>';
            if ($value[$column] != '') {
                echo '<TABLE width=100% height=7 style=\\"border:1;border-style: solid solid none solid;\\"><TR><TD></TD></TR></TABLE>';
            } else {
                echo '<TABLE width=100% height=7 style="border:1;border-style: solid solid none solid;"><TR><TD></TD></TR></TABLE>';
            }
            echo '</TD></TR>';
        }
        echo '<TR>';
        $i = 0;
        foreach ($options as $option) {
            if ($i % 2 == 0) {
                echo '</TR><TR>';
            }
            if ($value[$column] != '') {
                echo '<TD><INPUT TYPE=hidden name=' . $request . '[' . $column . '][] value=\\"\\"><INPUT type=checkbox name=' . $request . '[' . $column . '][] value=\\"' . str_replace('"', '&quot;', $option) . '\\"' . (strpos($value[$column], '||' . $option . '||') !== false ? ' CHECKED' : '') . '><small>' . $option . '</small></TD>';
            } else {
                echo '<TD><INPUT type=checkbox name=' . $request . '[' . $column . '][] value="' . str_replace('"', '&quot;', $option) . '"' . (strpos($value[$column], '||' . $option . '||') !== false ? ' CHECKED' : '') . '><small>' . $option . '</small></TD>';
            }
            $i++;
        }
        echo '</TR><TR><TD colspan=2>';
        if ($value[$column] != '') {
            echo '<TABLE width=100% height=7 style=\\"border:1;border-style: none solid solid solid;\\"><TR><TD></TD></TR></TABLE>';
        } else {
            echo '<TABLE width=100% height=7 style="border:1;border-style: none solid solid solid;"><TR><TD></TD></TR></TABLE>';
        }
        echo '</TD></TR></TABLE>';
        if ($value[$column] != '') {
            echo "\",\"div" . $request . "[" . $column . "]" . "\",true);' >" . ($value[$column] != '' ? str_replace('"', '&rdquo;', str_replace('||', ', ', substr($value[$column], 2, -2))) : '-') . "</div></DIV>";
        }
    } else {
        echo $value[$column] != '' ? str_replace('"', '&rdquo;', str_replace('||', ', ', substr($value[$column], 2, -2))) : '-<BR>';
    }
    echo '<small><FONT color=' . Preferences('TITLES') . '>' . $name . '</FONT></small>';
}
开发者ID:jicheng17,项目名称:fh,代码行数:53,代码来源:FunctionsInc.php

示例14: unset

#
#  You should have received a copy of the GNU General Public License
#  along with this program.  If not, see <http://www.gnu.org/licenses/>.
#
#***************************************************************************************
#DrawHeader('Gradebook - '.ProgramTitle());
include '../../Redirect_modules.php';
$tmp_REQUEST = $_REQUEST;
unset($tmp_REQUEST['include_inactive']);
echo "<FORM action=Modules.php?modname={$_REQUEST['modname']} method=POST>";
DrawHeaderHome('<INPUT type=checkbox name=include_inactive value=Y' . ($_REQUEST['include_inactive'] == 'Y' ? " CHECKED onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=\";'" : " onclick='document.location.href=\"" . PreparePHP_SELF($tmp_REQUEST) . "&include_inactive=Y\";'") . '>Include Inactive Students');
echo '</FORM>';
$course_period_id = UserCoursePeriod();
$course_id = DBGet(DBQuery("SELECT COURSE_ID FROM COURSE_PERIODS WHERE COURSE_PERIOD_ID='{$course_period_id}'"));
$course_id = $course_id[1]['COURSE_ID'];
$max_allowed = Preferences('ANOMALOUS_MAX', 'Gradebook') / 100;
$extra['SELECT'] = ",ga.ASSIGNMENT_ID,gt.TITLE AS TYPE_TITLE,ga.TITLE,ga.POINTS AS TOTAL_POINTS,'' AS LETTER_GRADE";
$extra['SELECT'] .= ',(SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS POINTS';
$extra['SELECT'] .= ',(SELECT COMMENT FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) AS COMMENT';
$extra['FROM'] = ",GRADEBOOK_ASSIGNMENTS ga,GRADEBOOK_ASSIGNMENT_TYPES gt";
$extra['WHERE'] = 'AND ((SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID) IS NULL AND (ga.ASSIGNED_DATE IS NULL OR CURRENT_DATE>=ga.ASSIGNED_DATE) AND (ga.DUE_DATE IS NULL OR CURRENT_DATE>=ga.DUE_DATE) OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)<0 OR (SELECT POINTS FROM GRADEBOOK_GRADES WHERE STUDENT_ID=s.STUDENT_ID AND ASSIGNMENT_ID=ga.ASSIGNMENT_ID)>ga.POINTS*' . $max_allowed . ') AND ((ga.COURSE_ID=\'' . $course_id . '\' AND ga.STAFF_ID=\'' . User('STAFF_ID') . '\') OR ga.COURSE_PERIOD_ID=\'' . $course_period_id . '\') AND ga.MARKING_PERIOD_ID=\'' . UserMP() . '\' AND gt.ASSIGNMENT_TYPE_ID=ga.ASSIGNMENT_TYPE_ID';
$extra['functions'] = array('POINTS' => '_makePoints');
$students_RET = GetStuList($extra);
//echo '<pre>'; var_dump($students_RET); echo '</pre>';
if (AllowUse('Grades/Grades.php')) {
    $link = array('FULL_NAME' => array('link' => "Modules.php?modname=Grades/Grades.php&include_ianctive={$_REQUEST['include_inactive']}&assignment_id=all", 'variables' => array('student_id' => 'STUDENT_ID')), 'TITLE' => array('link' => "Modules.php?modname=Grades/Grades.php&include_inactive={$_REQUEST['include_inactive']}", 'variables' => array('assignment_id' => 'ASSIGNMENT_ID', 'student_id' => 'STUDENT_ID')));
}
$columns = array('FULL_NAME' => 'Name', 'STUDENT_ID' => 'Student ID', 'POINTS' => 'Problem', 'TYPE_TITLE' => 'Category', 'TITLE' => 'Assignment', 'COMMENT' => 'Comment');
ListOutput($students_RET, $columns, 'Anomalous Grade', 'Anomalous Grades', $link, array(), array('center' => false, 'save' => false, 'search' => false));
function _makePoints($value, $column)
{
开发者ID:26746647,项目名称:Belize-openSIS,代码行数:31,代码来源:AnomalousGrades.php

示例15: array

     $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&mp_term=QTR&year_id={$_REQUEST['year_id']}&semester_id={$_REQUEST['semester_id']}";
     $link['TITLE']['variables'] = array('marking_period_id' => 'MARKING_PERIOD_ID');
     $link['add']['link'] = "Modules.php?modname={$_REQUEST['modname']}&mp_term=QTR&marking_period_id=new&year_id={$_REQUEST['year_id']}&semester_id={$_REQUEST['semester_id']}";
     ListOutput($qtr_RET, $columns, 'Quarter', 'Quarters', $link, array(), $LO_options);
     echo '</TD>';
     // PROGRESS PERIODS
     if ($_REQUEST['mp_term'] == 'QTR' && $_REQUEST['marking_period_id'] != 'new' || $_REQUEST['mp_term'] == 'PRO') {
         $sql = 'SELECT MARKING_PERIOD_ID,TITLE FROM school_progress_periods WHERE SCHOOL_ID=\'' . UserSchool() . '\' AND SYEAR=\'' . UserSyear() . '\' AND QUARTER_ID=\'' . $_REQUEST['quarter_id'] . '\' ORDER BY SORT_ORDER';
         $QI = DBQuery($sql);
         $pro_RET = DBGet($QI);
         if (count($pro_RET)) {
             if ($_REQUEST['mp_term'] == 'PRO' && $_REQUEST['marking_period_id'] != 'new') {
                 $_REQUEST['progress_period_id'] = $_REQUEST['marking_period_id'];
                 foreach ($pro_RET as $key => $value) {
                     if ($value['MARKING_PERIOD_ID'] == $_REQUEST['marking_period_id']) {
                         $pro_RET[$key]['row_color'] = Preferences('HIGHLIGHT');
                     }
                 }
             }
         }
         echo '<TD valign=top>';
         $columns = array('TITLE' => 'Progress Period');
         $link = array();
         $link['TITLE']['link'] = "Modules.php?modname={$_REQUEST['modname']}&modfunc={$_REQUEST['modfunc']}&mp_term=PRO&year_id={$_REQUEST['year_id']}&semester_id={$_REQUEST['semester_id']}&quarter_id={$_REQUEST['quarter_id']}";
         $link['TITLE']['variables'] = array('marking_period_id' => 'MARKING_PERIOD_ID');
         $link['add']['link'] = "Modules.php?modname={$_REQUEST['modname']}&mp_term=PRO&marking_period_id=new&year_id={$_REQUEST['year_id']}&semester_id={$_REQUEST['semester_id']}&quarter_id={$_REQUEST['quarter_id']}";
         $sql_mp_id = 'SELECT MARKING_PERIOD_ID,TITLE FROM school_progress_periods';
         ListOutput($pro_RET, $columns, 'Progress Period', 'Progress Periods', $link, array(), $LO_options);
         echo '</TD>';
     }
 }
开发者ID:26746647,项目名称:openSIS,代码行数:31,代码来源:MarkingPeriods.php


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