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


PHP Link::delVar方法代码示例

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


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

示例1: get_date_range_fields

function get_date_range_fields()
{
    $ret = array();
    $link = new Link();
    $link->delVar('date_start_day');
    $link->delVar('date_start_month');
    $link->delVar('date_start_year');
    $link->delVar('date_end_day');
    $link->delVar('date_end_month');
    $link->delVar('date_end_year');
    $ret['html'] = $link->getForm();
    // By default, show from "now() - 1 month" to NOW().
    // Unlike in case_details, we cannot show all, since it would return
    // too many results.
    $ret['html'] .= "<p class=\"normal_text\">\n";
    $ret['date_end'] = get_datetime_from_array($_REQUEST, 'date_end', 'end', "-1");
    $ret['date_start'] = get_datetime_from_array($_REQUEST, 'date_start', 'start', date('Y-m-d H:i:s', strtotime("-1 month" . ($ret['date_end'] != "-1" ? $ret['date_end'] : date('Y-m-d H:i:s')))));
    $ret['html'] .= _Ti('time_input_date_start');
    $ret['html'] .= get_date_inputs('date_start', $ret['date_start']);
    $ret['html'] .= _Ti('time_input_date_end');
    if ($ret['date_end'] == "-1") {
        $ret['html'] .= get_date_inputs('date_end');
    } else {
        $ret['html'] .= get_date_inputs('date_end', $ret['date_end']);
    }
    $ret['html'] .= ' <button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
    $ret['html'] .= "</p>\n";
    $ret['html'] .= "</form>\n";
    return $ret;
}
开发者ID:nyimbi,项目名称:legalcase,代码行数:30,代码来源:author_det.php

示例2: gmdate

        @header('Content-Type: image/gif');
        @header('Expires: 0');
        @header("Cache-Control: no-store, no-cache, must-revalidate");
        @header('Pragma: no-cache');
        @header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
        @readfile('ecrire/img_pack/rien.gif');
        // XXX change this
        exit;
    }
}
// If cookie_admin == no, delete the lcm_admin cookie
// This is the "connect with another identifier" on the login page
$cookie_admin = _request('cookie_admin');
if ($cookie_admin == 'no') {
    lcm_setcookie('lcm_admin', $lcm_admin, time() - 3600 * 24);
    $cible->delVar('var_login');
    $cible->addVar('var_login', '-1');
} else {
    if ($cookie_admin and $lcm_admin != $cookie_admin) {
        // Remember the username for the next login
        // This way, the user can login in only one form, not two
        lcm_setcookie('lcm_admin', $cookie_admin, time() + 3600 * 24 * 14);
    }
}
// Attempt to logout
if (_request('logout')) {
    include_lcm('inc_session');
    verifier_visiteur();
    global $author_session;
    if ($author_session['username'] == $_REQUEST['logout']) {
        if ($_COOKIE['lcm_session']) {
开发者ID:nyimbi,项目名称:legalcase,代码行数:31,代码来源:lcm_cookie.php

示例3: show_login

function show_login($cible, $prive = 'prive', $message_login = '')
{
    $error = '';
    $login = _request('var_login');
    $logout = _request('var_logout');
    // If the cookie fails, inc_auth tried to redirect to lcm_cookie who
    // then tried to put a cookie. If it is not there, it is "cookie failed"
    // who is there, and it's probably a bookmark on privet=yes and not
    // a cookie failure.
    $cookie_failed = "";
    if (_request('var_cookie_failed')) {
        $cookie_failed = $_COOKIE['lcm_session'] != 'cookie_test_failed';
    }
    global $author_session;
    global $lcm_session;
    global $clean_link;
    if (!$cible) {
        // cible = destination
        $cible = new Link(_request('var_url', 'index.php'));
    }
    $cible->delVar('var_erreur');
    $cible->delVar('var_url');
    $cible->delVar('var_cookie_failed');
    $clean_link->delVar('var_erreur');
    $clean_link->delVar('var_login');
    $clean_link->delVar('var_cookie_failed');
    $url = $cible->getUrl();
    // This populates the $author_session variable
    include_lcm('inc_session');
    verifier_visiteur();
    if ($author_session and !$logout and ($author_session['status'] == 'admin' or $author_session['status'] == 'normal')) {
        if ($url != $GLOBALS['clean_link']->getUrl()) {
            lcm_header("Location: " . $cible->getUrlForHeader());
        }
        // [ML] This is making problems for no reason, we use login only
        // for one mecanism (entering the system).
        // echo "<a href='$url'>"._T('login_this_way')."</a>\n";
        echo "<a class='content_link' href='index.php'>" . _T('login_this_way') . "</a>\n";
        return;
    }
    if (_request('var_erreur') == 'pass') {
        $error = _T('login_password_incorrect');
    }
    // The login is memorized in the cookie for a possible future admin login
    if (!$login && isset($_COOKIE['lcm_admin'])) {
        if (preg_match("/^@(.*)\$/", $_COOKIE['lcm_admin'], $regs)) {
            $login = $regs[1];
        }
    } else {
        if ($login == '-1') {
            $login = '';
        }
    }
    // other sources for authentication
    $flag_autres_sources = isset($GLOBALS['ldap_present']) ? $GLOBALS['ldap_present'] : '';
    // What informations to pass?
    if ($login) {
        $status_login = 0;
        // unknown status
        $login = clean_input($login);
        $query = "SELECT id_author, status, password, prefs, alea_actuel, alea_futur \n\t\t\t\t\tFROM lcm_author \n\t\t\t\t\tWHERE username='{$login}'";
        $result = lcm_query($query);
        if ($row = lcm_fetch_array($result)) {
            if ($row['status'] == 'trash' or $row['password'] == '') {
                $status_login = -1;
                // deny
            } else {
                $status_login = 1;
                // known login
                // Which infos to pass for the javascript ?
                $id_author = $row['id_author'];
                $alea_actuel = $row['alea_actuel'];
                // for MD5
                $alea_futur = $row['alea_futur'];
                // Button for lenght of connection
                if ($row['prefs']) {
                    $prefs = unserialize($row['prefs']);
                    $rester_checked = $prefs['cnx'] == 'perma' ? ' checked=\'checked\'' : '';
                }
            }
        }
        // Unknown login (except LDAP) or refused
        if ($status_login == -1 or $status_login == 0 and !$flag_autres_sources) {
            $error = _T('login_identifier_unknown', array('login' => htmlspecialchars(clean_output($login))));
            $login = '';
            // [ML] Not sure why this was here, but headers are already sent
            // therefore it causes an error message (which is not shown, but
            // might make a mess, knowing how PHP runs differently everywhere..)
            // @lcm_setcookie('lcm_admin', '', time() - 3600);
        }
    }
    // Javascript for the focus
    if ($login) {
        $js_focus = 'document.form_login.session_password.focus();';
    } else {
        $js_focus = 'document.form_login.var_login.focus();';
    }
    // [ML] we should probably add a help link here, since tech, but let's see
    // how many users complain first, since this should affect only tech users
    if ($cookie_failed == "yes") {
//.........这里部分代码省略.........
开发者ID:nyimbi,项目名称:legalcase,代码行数:101,代码来源:inc_login.php

示例4: printFollowups

 function printFollowups($show_filters = false)
 {
     $cpt = 0;
     $my_list_pos = intval(_request('list_pos', 0));
     show_page_subtitle(_T('case_subtitle_followups'), 'cases_followups');
     // Show filters (if not shown in ajaxed page)
     if ($show_filters) {
         // By default, show from "case creation date" to NOW().
         $link = new Link();
         $link->delVar('date_start_day');
         $link->delVar('date_start_month');
         $link->delVar('date_start_year');
         $link->delVar('date_end_day');
         $link->delVar('date_end_month');
         $link->delVar('date_end_year');
         echo $link->getForm();
         $date_end = get_datetime_from_array($_REQUEST, 'date_end', 'end', '0000-00-00 00:00:00');
         // date('Y-m-d H:i:s'));
         $date_start = get_datetime_from_array($_REQUEST, 'date_start', 'start', '0000-00-00 00:00:00');
         // $row['date_creation']);
         echo _Ti('time_input_date_start');
         echo get_date_inputs('date_start', $date_start);
         echo _Ti('time_input_date_end');
         echo get_date_inputs('date_end', $date_end);
         echo ' <button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
         echo "</form>\n";
         echo "<div style='margin-bottom: 4px;'>&nbsp;</div>\n";
         // FIXME patch for now (leave small space between filter and list)
     }
     show_listfu_start('general', false);
     for ($cpt = 0, $this->getFollowupStart(); !$this->getFollowupDone(); $cpt++) {
         $item = $this->getFollowupIterator();
         show_listfu_item($item, $cpt);
     }
     if (!$cpt) {
         echo "No followups";
     }
     // TRAD
     show_list_end($my_list_pos, $this->getFollowupTotal(), true);
 }
开发者ID:nyimbi,项目名称:legalcase,代码行数:40,代码来源:inc_obj_case.php

示例5: show_find_box

function show_find_box($type, $string, $dest = '', $layout = 'normal')
{
    static $find_box_counter = 0;
    // there may be more than one search box for a given type, in same page
    if ($type == 'client' && read_meta('client_hide_all') == 'yes') {
        return;
    }
    if ($type == 'org' && read_meta('org_hide_all') == 'yes') {
        return;
    }
    switch ($type) {
        case 'case':
        case 'client':
        case 'org':
        case 'author':
        case 'rep':
        case 'exp':
            $action = 'list' . $type . 's.php';
            break;
        default:
            lcm_panic("invalid type: {$type}");
    }
    if ($dest) {
        if ($dest == '__self__') {
            $link_dest = new Link();
            $link_dest->delVar('find_' . $type . '_string');
            $link_dest->delVar('submit');
            echo $link_dest->getForm('get', '', '', 'search_form');
        } else {
            $action = $dest;
        }
    } else {
        echo '<form name="frm_find_' . $type . '" class="search_form" action="' . $action . '" method="get">' . "\n";
    }
    echo '<label for="find_box' . $find_box_counter . '">';
    echo _T('input_search_' . $type) . "&nbsp;";
    echo "</label>\n";
    if ($layout == 'narrow') {
        echo "<br />\n";
    }
    echo '<input type="text" id="find_box' . $find_box_counter . '" name="find_' . $type . '_string" size="10" class="search_form_txt" value="' . clean_output($string) . '" />';
    echo '&nbsp;<input type="submit" name="submit" value="' . _T('button_search') . '" class="search_form_btn" />' . "\n";
    echo "</form>\n";
    $find_box_counter++;
}
开发者ID:nyimbi,项目名称:legalcase,代码行数:45,代码来源:inc_presentation.php

示例6: Link

        } else {
            $tmp_link->addVar('show_nokw', "1");
            echo '<p><a href="' . $tmp_link->getUrl() . '" class="run_lnk">' . _T('rep_button_nokw_show') . "</a></p>\n";
        }
    }
    echo '<p><a href="rep_det.php?rep=' . $report->getId() . '" class="run_lnk">' . _T('rep_button_goback') . "</a></p>\n";
    //
    // Make a link to export the report
    //
    echo '<p>';
    $link_csv = new Link();
    $link_csv->delVar('export');
    $link_csv->addVar('export', 'csv');
    echo '<a href="' . $link_csv->getUrl() . '" class="exp_lnk">' . _T('rep_button_exportcsv') . '</a> ';
    $link_ods = new Link();
    $link_ods->delVar('export');
    $link_ods->addVar('export', 'ods');
    echo '<a href="' . $link_ods->getUrl() . '" class="exp_lnk">' . _T('rep_button_exportcsv') . ' (ODS)' . '</a>';
    // TRAD
    echo "</p>\n";
    //
    // Print debug information, if requested
    //
    if (isset($_REQUEST['debug'])) {
        $dbg = $report->getJournal();
        foreach ($dbg as $line) {
            echo $line;
        }
    }
    lcm_page_end();
}
开发者ID:nyimbi,项目名称:legalcase,代码行数:31,代码来源:run_rep.php


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