• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_line函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: get_user_info_by_id

function get_user_info_by_id($uid)
{
    $sql_pre = "SELECT `username` ,`password` FROM `user` WHERE `id` = ?i AND username = ?s LIMIT 1 ";
    $array = array('1', "haixiao");
    $sql = prepare($sql_pre, $array);
    return get_line($sql);
}
开发者ID:doumaomao,项目名称:Lazy-lawyer,代码行数:7,代码来源:user.function.php


示例2: get_law_by_id

function get_law_by_id($caseid)
{
    $sql_pre = "SELECT `id` , `title`  , `lawcat`  , `time` , `content` FROM `yxy_laws` WHERE `id` = ?i ";
    $array = array($caseid);
    $sql = prepare($sql_pre, $array);
    return get_line($sql);
}
开发者ID:doumaomao,项目名称:Lazy-lawyer,代码行数:7,代码来源:law.function.php


示例3: get_master_info

function get_master_info($username)
{
    $sql_pre = "SELECT `username`  , `password` FROM `yxy_master` WHERE `username` = ?s";
    $array = array($username);
    $sql = prepare($sql_pre, $array);
    return get_line($sql);
}
开发者ID:doumaomao,项目名称:Lazy-lawyer,代码行数:7,代码来源:app.function.php


示例4: get_admin_info_by_id

function get_admin_info_by_id($id)
{
    $sql = "SELECT * FROM `admin` WHERE `admin_id` = '" . intval($id) . "' LIMIT 1";
    if ($line = get_line($sql)) {
        return $line;
    }
    return false;
}
开发者ID:Ethennoob,项目名称:flat,代码行数:8,代码来源:admin.function.php


示例5: modif_field

function modif_field()
{
    echo "What do you want to update?\n> ";
    $arr = array("age", "name", "email", "phone");
    $field = get_line();
    while (!in_array($field, $arr)) {
        echo "Erreur: age/name/email/phone.\n";
        echo "What do you want to update?\n> ";
        $field = get_line();
    }
    return $field;
}
开发者ID:amira-s,项目名称:etna-projects,代码行数:12,代码来源:complement.php


示例6: confirm

function confirm()
{
    echo "Are you sure ?\n> ";
    $conf = get_line();
    while (preg_match_all("/^oui|yes|no|non\$/i", $conf) != 1) {
        echo "Erreur: Oui / Yes / Non / No.\n";
        echo "Are you sure ?\n> ";
        $conf = get_line();
    }
    if (preg_match_all("/^oui|yes\$/i", $conf) == 1) {
        return TRUE;
    } else {
        return FALSE;
    }
}
开发者ID:amira-s,项目名称:etna-projects,代码行数:15,代码来源:etna_movies.php


示例7: get_number

function get_number($new = 0)
{
    if ($new == 1) {
        $phrase = "New phone number ?\n> ";
    } else {
        $phrase = "Phone number ?\n> ";
    }
    echo $phrase;
    $number = get_line();
    while (preg_match("/^[0-9]{10}\$/i", $number) !== 1) {
        echo "Erreur: Numéro invalide.\n";
        echo $phrase;
        $number = get_line();
    }
    return $number;
}
开发者ID:amira-s,项目名称:etna-projects,代码行数:16,代码来源:get_info.php


示例8: plugin_simple_token

function plugin_simple_token()
{
    $do = z(t(v('do')));
    switch ($do) {
        case 'create':
        case 'refresh':
            $new_token = substr(md5(uid() . time("Y h j G") . rand(1, 9999)), 0, rand(9, 20));
            $new_token = uid() . substr(md5($new_token), 0, 10);
            $sql = "REPLACE INTO `stoken` ( `uid` , `token` , `on` ) VALUES ( '" . intval(uid()) . "' , '" . s($new_token) . "' , '1' )";
            run_sql($sql);
            if (db_errno() == 0) {
                return ajax_echo('done');
            } else {
                return ajax_echo('error');
            }
            break;
        case 'close':
            $sql = "UPDATE `stoken` SET `on` = '0' WHERE `uid` = '" . intval(uid()) . "' LIMIT 1";
            run_sql($sql);
            if (db_errno() == 0) {
                return ajax_echo('done');
            } else {
                return ajax_echo('error');
            }
            break;
        case 'reopen':
            $sql = "UPDATE `stoken` SET `on` = '1' WHERE `uid` = '" . intval(uid()) . "' LIMIT 1";
            run_sql($sql);
            if (db_errno() == 0) {
                return ajax_echo('done');
            } else {
                return ajax_echo('error');
            }
            break;
        default:
            $data['tinfo'] = get_line("SELECT * FROM `stoken` WHERE `uid` = '" . intval(uid()) . "' LIMIT 1");
            render($data, 'ajax', 'plugin', 'simple_token');
    }
}
开发者ID:ramo01,项目名称:1kapp,代码行数:39,代码来源:app.php


示例9: get_line

function get_line($date, $epg_lines, $line_num)
{
    $epg_line = @trim($epg_lines[$line_num]);
    preg_match("/(\\d+):(\\d+)[\\s\t]*([\\S\\s]+)/", $epg_line, $tmp_line);
    if (@$tmp_line[1] && $tmp_line[2] && $tmp_line[3]) {
        $result = array();
        $time = $date . ' ' . $tmp_line[1] . ':' . $tmp_line[2] . ':00';
        $result['time'] = $time;
        //$result['name'] = addslashes($tmp_line[3]);
        $result['name'] = $tmp_line[3];
        $next_line = get_line($date, $epg_lines, $line_num + 1);
        if (!empty($next_line)) {
            $time_to = $next_line['time'];
            $result['time_to'] = $time_to;
            $result['duration'] = strtotime($time_to) - strtotime($time);
        } else {
            $result['time_to'] = 0;
            $result['duration'] = 0;
        }
        return $result;
    }
    return false;
}
开发者ID:riderby,项目名称:ITV.BY-stalker_portal,代码行数:23,代码来源:add_epg.php


示例10: login

 public function login()
 {
     $u = t(v('uname'));
     $p = t(v('psw'));
     if (true !== $this->loginCheck($u, $p)) {
         return ajax_json(array('title' => '登录失败:', 'status' => 1, 'msg' => '用户名或者密码错误!'));
     }
     //		$p=md5(v('psw'));
     $sql = "select name from admin_user as u where u.name=" . s($u);
     $result = get_line($sql);
     //var_dump($result);
     if (!$result) {
         return ajax_json(array('title' => '登录失败:', 'status' => 1, 'msg' => '用户名或者密码错误1!'));
     } elseif ($result['status'] == 'delete') {
         return ajax_json(array('title' => '登录失败:', 'status' => 1, 'msg' => '用户已经被封禁!'));
     } elseif ($result['status'] == 'active') {
         ss_set('uid', $result['id']);
         ss_set('email', $result['email']);
         ss_set('nickname', $result['nickname']);
         ss_set('uname', $u);
         admin_log($result['id'], "登录后台管理系统.");
         return ajax_json(array('title' => '登录成功:', 'status' => 0, 'msg' => '您已成功登录!'));
     }
 }
开发者ID:adamchau,项目名称:teamdisk,代码行数:24,代码来源:login.class.php


示例11: trigger_error

} else {
    trigger_error("You can only run this script from the command line\n", E_USER_ERROR);
}
if (empty($SYSTEM_ROOT)) {
    echo $err_msg;
    exit;
}
if (!is_dir($SYSTEM_ROOT) || !is_readable($SYSTEM_ROOT . '/core/include/init.inc')) {
    echo "ERROR: Path provided doesn't point to a Matrix installation's System Root. Please provide correct path and try again.\n";
    exit;
}
require_once $SYSTEM_ROOT . '/core/include/init.inc';
echo "Note: data/public/test_message.php has been moved to core/lib/web/test_message.php as a result of RM #5722\n";
$confirm = null;
while ($confirm != 'y' && $confirm != 'n') {
    $confirm = strtolower(get_line('Delete data/public/test_message.php? (y/n)? : '));
    if ($confirm != 'y' && $confirm != 'n') {
        echo 'Please answer y or n' . "\n";
    }
}
if ($confirm == 'y') {
    echo "Removing..";
    $file_path = $SYSTEM_ROOT . '/data/public/test_message.php';
    if (is_file($file_path)) {
        unlink($file_path);
    }
    echo "done.\n";
}
/**
* Prints the specified prompt message and returns the line from stdin
*
开发者ID:joshgillies,项目名称:mysource-matrix,代码行数:31,代码来源:upgrade_test_message.php


示例12: login_check

 public function login_check()
 {
     $email = z(t(v('email')));
     $password = z(t(v('password')));
     if (strlen($email) < 1 || strlen($password) < 1) {
         return ajax_echo("电子邮件和密码不能为空");
     }
     $sql = "SELECT `id` , `email` FROM `__meta_user` WHERE `email` = '" . s($email) . "' AND `password` = '" . md5($password) . "'";
     if (!($user = get_line($sql))) {
         return ajax_echo("电子邮件和密码不匹配,请重试");
     }
     $_SESSION['uid'] = $user['id'];
     $_SESSION['email'] = $user['email'];
     $_SESSION['ulevel'] = 9;
     // do login
     return ajax_echo("成功登录,转向中…<script>location = '?a=index';</script>");
 }
开发者ID:jfojfo,项目名称:LazyREST,代码行数:17,代码来源:default.class.php


示例13: while

    echo "ERROR: You need to supply the path to the System Root as the first argument\n";
    exit;
}
if (!is_dir($SYSTEM_ROOT) || !is_readable($SYSTEM_ROOT . '/core/include/init.inc')) {
    echo "ERROR: Path provided doesn't point to a Matrix installation's System Root. Please provide correct path and try again.\n";
    exit;
}
require_once $SYSTEM_ROOT . '/core/include/init.inc';
$root_user = $GLOBALS['SQ_SYSTEM']->am->getSystemAsset('root_user');
$GLOBALS['SQ_SYSTEM']->setCurrentUser($root_user);
echo "\n";
$GLOBALS['SQ_SYSTEM']->changeDatabaseConnection('db2');
$db =& $GLOBALS['SQ_SYSTEM']->db;
$action = NULL;
while ($action != 'add' && $action != 'remove') {
    $action = get_line('Please specify whether you want to \'add\' or \'remove\' a URL: ');
}
require_once $SYSTEM_ROOT . '/scripts/url_manager.inc';
if ($action == 'add') {
    $inputs = URL_Manager::cliInterfaceAddUrl();
    $queries = URL_Manager::addUrl($inputs['http'], $inputs['https'], $inputs['new_url'], $inputs['existing_url'], $inputs['siteid'], $inputs['update_file_public_live_assets'], $inputs['existing_urlid'], $SYSTEM_ROOT);
} else {
    if ($action == 'remove') {
        $remove_url_info = URL_Manager::cliInterfaceRemoveUrl();
        $queries = URL_Manager::removeUrl($remove_url_info['remove_urlid'], $remove_url_info['remove_assetid'], $remove_url_info['remove_url'], FALSE, $SYSTEM_ROOT);
    }
}
//end else if
$GLOBALS['SQ_SYSTEM']->restoreDatabaseConnection();
$GLOBALS['SQ_SYSTEM']->restoreCurrentUser();
exit(0);
开发者ID:joshgillies,项目名称:mysource-matrix,代码行数:31,代码来源:add_remove_url.php


示例14: plugin_check_mail

function plugin_check_mail()
{
    if (intval(kget('mqueue_on')) != 1) {
        return false;
    }
    $sql = "SELECT * FROM `mail_queue` WHERE `timeline` > '" . date("Y-m-d H:i:s", strtotime("-1 hour")) . "' LIMIT 1";
    if ($line = get_line($sql)) {
        session_write_close();
        $info = unserialize($line['data']);
        if (phpmailer_send_mail($info['to'], $info['subject'], $info['body'], kget('mqueue_username'), kget('mqueue_server'), kget('mqueue_port'), kget('mqueue_username'), kget('mqueue_password'))) {
            $sql = "DELETE FROM `mail_queue` WHERE `id` = '" . intval($line['id']) . "' LIMIT 1";
        } else {
            $sql = "UPDATE `mail_queue` SET `timeline` = '" . date("Y-m-d H:i:s", strtotime("-2 hours")) . "' LIMIT 1 ";
        }
        run_sql($sql);
    }
    include_once AROOT . 'controller' . DS . 'api.class.php';
    if (db_errno() != 0) {
        apiController::send_error(LR_API_DB_ERROR, 'DATABASE ERROR ' . db_error());
    }
    return apiController::send_result(array('to_send' => get_var("SELECT COUNT(*) FROM `mail_queue` WHERE `timeline` > '" . date("Y-m-d H:i:s", strtotime("-1 hour")) . "' ")));
}
开发者ID:xianliflc,项目名称:teamirr,代码行数:22,代码来源:app.php


示例15: get_var

function get_var($sql, $db = NULL)
{
    $data = get_line($sql, $db);
    return $data[@reset(@array_keys($data))];
}
开发者ID:jfojfo,项目名称:LazyREST,代码行数:5,代码来源:db.function.php


示例16: get_nb_last_line

<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<h1>categories</h1>

<?php 
require 'bdd.php';
$champ1 = 1;
$champ2 = 2;
$rep_id_categorie_nom = '../' . $id_categorie_nom;
$last_line_categories = get_nb_last_line($rep_id_categorie_nom);
$tab_categories[$last_line_categories][2] = 0;
for ($i = 1; $i <= $last_line_categories; $i++) {
    $categorie_line = get_line($rep_id_categorie_nom, $i);
    $tab_categories[$i][$champ1] = get_champ_line($categorie_line, $champ1);
    $tab_categories[$i][$champ2] = get_champ_line($categorie_line, $champ2);
}
$j = 1;
for ($i = 1; $i <= $last_line_categories; $i++) {
    if ($j == 1) {
        echo '<div style="color:green;background-color:D8D8D8;float:left;width:72%;height:45px;">';
        $j++;
    } else {
        echo '<div style="color:green;float:left;width:72%;height:45px;">';
        $j = 1;
    }
    echo '<strong>' . $tab_categories[$i][$champ2] . '</strong><br />';
    echo '</div>';
    echo '<div style="float:left;width:28%;height:45px;">';
    echo '<img onclick="edit_categorie();" width="45px" height="45px" src="../bdd/images/icones/edit.png">';
    echo '<img onclick="delete_categorie();" width="45px" height="45px" src="../bdd/images/icones/delete.png">';
    echo '</div>';
}
开发者ID:chipsetx,项目名称:wiki-mobile,代码行数:31,代码来源:categories.php


示例17: get_nb_last_line

$champ3 = 3;
// numero dernieres lignes fini
$last_line_categories = get_nb_last_line($id_categorie_nom);
$last_line_relations = get_nb_last_line($id_page_id_categorie_nom_page);
// tableaux fini
$tab_categories[$last_line_categories][2] = 0;
$tab_relations[$last_line_relations][3] = 0;
// tab categories fini
for ($i = 1; $i <= $last_line_categories; $i++) {
    $categorie_line = get_line($id_categorie_nom, $i);
    $tab_categories[$i][$champ1] = get_champ_line($categorie_line, $champ1);
    $tab_categories[$i][$champ2] = get_champ_line($categorie_line, $champ2);
}
// tab avec lignes relations fini
for ($j = 1; $j <= $last_line_relations; $j++) {
    $relation = get_line($id_page_id_categorie_nom_page, $j);
    $tab_relations[$j][$champ1] = get_champ_line($relation, $champ1);
    $tab_relations[$j][$champ2] = get_champ_line($relation, $champ2);
    $tab_relations[$j][$champ3] = get_champ_line($relation, $champ3);
}
// affichage des categories et ses pages
for ($i = 1; $i <= $last_line_categories; $i++) {
    echo '<div style="margin-bottom:4px;margin-top:4px;font-size:150%;background-color:grey;color:white;"><strong>' . $tab_categories[$i][$champ2] . '</strong></div>';
    //echo '<h2>'.$tab_categories[$i][$champ2].'</h2>';
    for ($j = 1; $j <= $last_line_relations; $j++) {
        if ($tab_categories[$i][$champ1] == $tab_relations[$j][$champ2]) {
            echo '<div style="background-color:D8D8D8;font-size:120%;margin-top:4px;"><a href="core/print_page.php?id_page=' . $tab_relations[$j][$champ1] . '">' . $tab_relations[$j][$champ3] . '</a></div>';
        }
    }
}
//echo '<ul>';
开发者ID:chipsetx,项目名称:wiki-mobile,代码行数:31,代码来源:index.php


示例18: get_line

        }
        if (substr($from_url . '/', 0, strlen($root_url) + 1) == $root_url . '/') {
            $matching_from_roots[] = $root_url;
        }
    }
    if (empty($matching_roots)) {
        echo 'The new URL entered, "' . $to_url . '", is not based upon an existing System Root URL.' . "\n";
        $to_url = get_line('Please re-enter the new URL: ');
    } else {
        $root_ok = TRUE;
    }
}
//end while root not OK
$confirm = null;
while ($confirm != 'y' && $confirm != 'n') {
    $confirm = strtolower(get_line('Change ' . $from_url . ' to ' . $to_url . ' (y/n)? : '));
    if ($confirm != 'y' && $confirm != 'n') {
        echo 'Please answer y or n' . "\n";
    } else {
        if ($confirm == 'n') {
            exit;
        }
    }
}
// update any urls that use this url in the lookup and lookup value tables
foreach (array('sq_ast_lookup_value', 'sq_ast_lookup') as $tablename) {
    $sql = 'UPDATE
				' . $tablename . '
			SET
				url = :to_url || SUBSTR(url, :from_url_length + 1)
			WHERE
开发者ID:joshgillies,项目名称:mysource-matrix,代码行数:31,代码来源:replace_url.php


示例19: get_var

/**
 * 以变量方式获取记录
 * @param $sql
 * @return mixed
 */
function get_var($sql, $db = NULL)
{
    $data = get_line($sql, $db);
    return !is_array($data) ? NULL : @array_shift($data);
}
开发者ID:boxcore,项目名称:xspider,代码行数:10,代码来源:db.fn.php


示例20: get_user_info_by_id

function get_user_info_by_id($username)
{
    $sql = prepare("SELECT * FROM `login` WHERE `UserName` = ?s", array($username));
    return get_line($sql);
}
开发者ID:vehery,项目名称:brandNewiCYL,代码行数:5,代码来源:checkin.function.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_link函数代码示例发布时间:2022-05-15
下一篇:
PHP get_library_number函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap