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


PHP rstr函数代码示例

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


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

示例1: minimg

function minimg($amg, $prm)
{
    if ($prm == 'no') {
        return;
    }
    $mg = first_img($amg);
    if ($mg) {
        return make_thumb($mg, $prm);
    } elseif (rstr(87)) {
        return mini_empty($prm);
    }
}
开发者ID:philum,项目名称:cms,代码行数:12,代码来源:spe.php

示例2: output_pages_from_cache

function output_pages_from_cache($http, $otp)
{
    $npg = $_SESSION['prmb'][6];
    $page = $_SESSION['page'];
    $min = ($page - 1) * $npg;
    $max = $page * $npg;
    if (is_array($otp)) {
        foreach ($otp as $id => $nb) {
            if (is_numeric($id)) {
                $i++;
                if ($i >= $min && $i < $max) {
                    $mg = $http . '/imgc/' . first_img($nb[3]);
                    if (is_link($mg)) {
                        $ret .= btn('imgl', image($mg, '', 50));
                    }
                    $ret .= bal('h2', lka($http . '/' . $id, $nb[2]));
                    $ret .= btn('txtx', $nb[1]) . ' ';
                    if (rstr(27)) {
                        $ret .= btn('txtsmall', mkday($nb[0], 1)) . ' ' . pub_link($nb[9]) . ' ';
                    }
                    if (rstr(25)) {
                        $ret .= btn('txtsmall', art_length($nb[8]));
                    }
                    $ret .= br() . br();
                }
            }
        }
    }
    $n_pages = nb_page($i, $npg, $page);
    return $n_pages . $ret . $n_pages;
}
开发者ID:philum,项目名称:cms,代码行数:31,代码来源:channel.php

示例3: makeoutfile

function makeoutfile($str)
{
    $funcname = rstr();
    $varname = '$' . rstr();
    $template = "<?php function " . $funcname . "({$varname})\n{ \n{$varname}=gzinflate(base64_decode({$varname}));\n for(\$i=0;\$i<strlen({$varname});\$i++)\n {\n" . $varname . "[\$i] = chr(ord(" . $varname . "[\$i])-1);\n }\n return {$varname};\n }eval({$funcname}(\"";
    $str = enjumble($str);
    $template = $template . $str . "\"));?>";
    return $template;
}
开发者ID:xl7dev,项目名称:WebShell,代码行数:9,代码来源:Carbylamine+PHP+Encoder.php

示例4: hashpass

 function hashpass($pass, $salt = "")
 {
     if (!$salt) {
         $salt = rstr(60);
     }
     $opts = array('cost' => 10, 'salt' => $salt);
     $hashed = password_hash($pass, PASSWORD_BCRYPT, $opts);
     return $hashed;
 }
开发者ID:hubertron,项目名称:polr,代码行数:9,代码来源:setup.php

示例5: plug_flashgallery

function plug_flashgallery($f, $id)
{
    //list($r,$f)=decide_source($f,$id); p($f);
    if ($_SESSION['read'] or rstr(41)) {
        $ret = embed_gallery($f, $id) . $add;
    } else {
        $ret = btn('txtx', "PhotoGallery");
    }
    if (!$_SESSION['nl']) {
        return $ret;
    }
}
开发者ID:philum,项目名称:cms,代码行数:12,代码来源:flashgallery.php

示例6: rech_titles

function rech_titles($rech, $dig, $opt, $cac, $cat, $tag, $tag2)
{
    list($bol, $ord, $tit, $pho) = split("-", $opt);
    $load = $_SESSION['load'];
    $days = geta('dig', $dig);
    $bol = substr($rech, -1) == '*' ? 1 : get('bool', $bol);
    $_GET['bool'] = $bol;
    //$_GET['pho']=$pho;
    $ret .= btn('search', input(1, 'search', $rech . '" size="32" maxlength="150', '')) . ' ';
    $ret .= ljb('popsav', 'Search2();', '', nms(24)) . ' ';
    $ret .= hlpbt('search') . ' ';
    if ($cac) {
        $ret .= blj('popbt', 'srcac', 'plug___search_rech*reset_' . $cac, picto('del'));
    }
    if ($load) {
        $ret .= btn("popw", nbof(count($load), 1));
    }
    //.', '.nbof(array_sum($load),19).' '
    if (rstr(3)) {
        $ret .= br() . dig_h($days);
    } else {
        $ret .= hidden('', 'srdig', 1000);
    }
    //days
    if (!isset($_SESSION['rstr62'])) {
        sesr('rstr62', rstr(62));
    }
    if (rstr(3)) {
        $ret .= togses('rstr62', pictit('right', nms(134))) . ' ';
    }
    //dig
    $urg = mkurl(array('bool', 'titles', 'cat', 'tag'));
    if ($rech) {
        $ret .= lkc('', htac('search') . $rech . '/' . $dig, picto('link')) . ' ';
    }
    //.$urg
    $ret .= br() . checkact('srord', $ord, nms(18)) . ' ';
    $ret .= checkact('srtit', $tit, nms(72)) . ' ';
    //$ret.=checkact('srpho',get('pho'),'').' ';//nms(123)
    $ret .= checkact('srbol', $bol, nms(70)) . '' . hlpbt('bool') . ' ';
    $ret .= select_j('srcat', 'category', $cat ? $cat : nms(9), 1) . ' ';
    //hidslct_j
    $ret .= select_j('srtag', 'tag', $tag ? $tag : 'tag', '');
    //$ret.=select_j('srtag2','thèmes',$tag3,'thèmes');
    return divc('titles', $ret);
}
开发者ID:philum,项目名称:cms,代码行数:46,代码来源:search.php

示例7: rstr

$prices = [];
for ($i = 0; $i < $lines; $i += 1) {
    $line = rstr(10);
    $line .= '/';
    $line .= rstr(15);
    $line .= '/';
    $line .= rstr(7);
    $line .= '/';
    $price = number_format(rfloat(5, 100), 2);
    $line .= $price;
    $prices[] = $price;
    $line .= '/';
    $date = rnum(1262055681, 1302055681);
    $line .= date('Y-m-d', $date);
    $line .= '/';
    $line .= rstr(20);
    $line .= PHP_EOL;
    $output .= $line;
}
$min = floatval(number_format($prices[rnum(0, count($prices) - 1)] / 2, 2));
$max = floatval(number_format($min * (22 / 7), 2));
$r = rnum(0, 5);
if ($r == 0) {
    // 3 5
    $min += $max;
    // $min = 8
    $max = $min - $max;
    // $max = 3
    $min = $min - $max;
    // $min = 5
}
开发者ID:KonstantinKirchev,项目名称:PHP,代码行数:31,代码来源:generateData.php

示例8: list_tags

function list_tags($idart, $cat)
{
    //tag_list()
    if (rstr(3) && !is_numeric($cat)) {
        $limit = ' and day>"' . calc_date(30) . '"';
    }
    $wh = 'and cat="' . $cat . '"' . $limit . ' order by tag';
    $r = artags('idtag,tag', $wh, 'kv');
    return add_tag_btn($r, $idart, $cat);
}
开发者ID:philum,项目名称:cms,代码行数:10,代码来源:meta.php

示例9: page_titles

function page_titles($o = '', $rid = '')
{
    $load = ses('load');
    //$o=parent
    $days = getorpost('dig', ses('nbj'));
    $daybb = calc_date($days);
    $rech = good_rech();
    $nms = ses('nms');
    $frm = ses('frm');
    $read = ses('read');
    list($utg, $utv) = detect_uget();
    if ($rech) {
        $ico = btn("txtcadr", pictxt('search', $rech));
        if (get('targ')) {
            return;
        }
        if (is_array($load)) {
            $p['nbarts'] = nbof(count($load), 1) . ' (' . nbof(array_sum($load), 16) . ') / ' . nbof($days, 3);
        }
        $p['opt'] = lj('', 'popup_search___' . $rech, picto('popup'));
        if ($pg = $_SESSION['page'] > 1) {
            $p['opt'] = btn('txtsmall', 'page ' . $pg);
        }
        $p['suj'] = $rech;
        $p['url'] = 'search/' . $rech . '/' . $days;
    } elseif (get('rub_tag')) {
        $rub_t = get('rub_tag');
    } elseif (get('rssurl')) {
        $p['suj'] = $nms[15];
    } elseif ($par = get('parent')) {
        $read = 1;
        $p['suj'] = suj_of_id($par);
        $p['url'] = urlread($par);
    } elseif ($utg) {
        $p['suj'] = $utv;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, $utg, $rid) . ' ';
        $p['url'] = htac($utg) . $utv;
    } elseif ($tag = get('source')) {
        $p['suj'] = $tag;
        $_SESSION['frm'] = '';
        $p['date'] = dig_it($days, 'source', $rid) . ' ';
        $p['url'] = 'source/' . $tag . '/' . $days;
    } elseif ($tag = get('tag')) {
        $p['suj'] = $tag;
        $p['url'] = 'tag/' . $tag . '/' . $days;
        $p['date'] = dig_it($days, 'tag', $rid) . ' ' . lkc('txtx', htac('tag') . $tag, picto('url')) . ' ';
        $p['date'] .= lj('txtx', 'popup_search__3_' . ajx($tag) . '_' . $days, picto('search'));
    } elseif (get('module') == 'All') {
        $p['suj'] = get('module');
        $p['url'] = htac('module') . get('module');
    } elseif ($frm) {
        $p['suj'] = $frm;
        $p['url'] = htac('section') . $frm;
    }
    if (!$read) {
        //nav//nbarts
        if ($utv or $tag or $rub_t or get('source')) {
            if ($load) {
                $nbarts = count($load);
                if (!$rub_t) {
                    $_SESSION['frm'] = '';
                }
            }
        } elseif ($frm != "Home" && get('module') != "All" && $frm) {
            if (get('dig') or $_SESSION['lang']) {
                list($slct, $in, $wh, $ord, $gr) = play_req(' and re>0');
                $nbarts = sql('count(id)', 'qda', 'v', $wh);
            } else {
                $nbarts = $_SESSION['line'][$frm];
            }
        } elseif (ses('line')) {
            foreach ($_SESSION['line'] as $k => $v) {
                $nbarts += $v;
            }
        }
    }
    if ($frm && $frm != 'Home' && $frm != 'All' && !$read && !$p['date']) {
        $p['date'] = dig_it($days, 'section', $rid) . ' ';
    }
    // && !$rech
    if (!$read && !$p['nbarts']) {
        $p['nbarts'] = nbof($nbarts, 1) . (rstr(3) ? ' / ' . nbof($days, 3) : '');
    }
    if ($page = ses('page') && $page > 1) {
        $p['nbarts'] .= ' (page ' . $page . ') ';
    }
    if (!$load && $o) {
        $p['parent'] = find_navigation(ses('read'));
    }
    //rstr(78)
    if ($_GET['rub_tag']) {
        $p['tag'] = rub_tags('');
        $p['opt'] = lkc('txtx', htac('tag') . $rub_t, '&#9658;' . $rub_t);
    }
    if ($p['suj'] == 'All') {
        $p['suj'] = ses('nbj') . ' ' . nms(4);
    }
    if ($p['suj'] == 'Home') {
        $p['suj'] = nms(69);
//.........这里部分代码省略.........
开发者ID:philum,项目名称:cms,代码行数:101,代码来源:spe.php

示例10: save_track

function save_track($msg, $id, $name, $mail)
{
    $pdt = time();
    $iq = hostname();
    //ses('iq');
    if (is_numeric($id) or substr($id, 0, 4) == 'wall') {
        $local = true;
    }
    if (!$msg) {
        return;
    }
    // btn('popdel','bruuu! '.helps('empty_msg'));
    req('sav');
    $qb = $_SESSION['qb'];
    $base = $_SESSION['qdi'];
    $_GET['idy'] = 'ok';
    $_GET['insert'] = 'ok';
    $_POST['name'] = $nm;
    $_POST['msg'] = $msg;
    if (!rstr(2) or auth(4)) {
        $op = 1;
    } else {
        $op = 0;
    }
    $here = host() . '/?read=' . $id;
    $msg = str_replace(":chat", "", $msg);
    $msg = repair_latin($msg);
    $msg = embed_links($msg);
    //$amsg=mysql_real_escape_string(stripslashes($msg));
    $values = array($ib, $name, $mail, $pdt, $qb, $id, $suj, $msg, $op, $ip);
    //,'','',''
    $nread = insert('qdi', mysqlra($values));
    $suj = $local ? suj_of_id($id) : nms(84);
    $nmsg = lka($here . '#trk' . $nread, $local ? helps('trackmail') : nms(84)) . br() . br();
    $nmsg .= nms(68) . ': ' . $name . ', ' . mkday($pdt) . br() . br() . format_txt($msg, '', '');
    $admail = $_SESSION['qbin']['adminmail'];
    //to_admin
    if ($name != $_SESSION['USE']) {
        send_mail_html($admail, $suj, $nmsg, $mail, urlread($id));
    }
    if ($local) {
        $rmails = sql('mail', 'qdi', 'k', 'frm="' . $id . '" AND re>="1"');
    }
    //deploy
    $kem = sql('name', 'qda', 'v', 'id="' . $id . '"');
    //send_to_author
    if ($kem != $name) {
        $kmail = sql('mail', 'qdu', 'v', 'name="' . $kem . '"');
        if ($admail != $kmail) {
            $rmails[$kmail] = 1;
        }
    }
    //send_track_to_user
    if ($rmails && $op == 1) {
        send_mail_r(array_keys_b($rmails), 'html', $suj, $nmsg, $mail, $id);
    }
    if (!$local) {
        return popup(nms(34), divc('', helps('formail')), '');
    }
    return tracks_read($nread, '', '');
}
开发者ID:philum,项目名称:cms,代码行数:61,代码来源:tracks.php

示例11: r_apps_home

function r_apps_home($o)
{
    $r = msql_read_b('system', 'default_apps_home', '', 1);
    if ($o) {
        return $r;
    }
    $rb = r_apps_cond('home');
    if (!rstr(56)) {
        $r = unset_in($r, 'hubs', 0);
    }
    //if(!rstr(48))$r=unset_in($r,'boot',6);
    return array_merge_b($rb, $r);
}
开发者ID:philum,项目名称:cms,代码行数:13,代码来源:bubs.php

示例12: show_params_cat

function show_params_cat($r, $h)
{
    $ron = 1;
    $fon = 0;
    $j = 'lang_admin*restrictions_';
    foreach ($r as $k => $v) {
        $hlp = bubble('txtsmall2', 'popmsqt', $j . $k . '_description', $k);
        $t = $h[$k][0] ? $h[$k][0] : $v;
        if (rstr($k)) {
            $n = 1;
            $c = '';
        } else {
            $n = 0;
            $c = 'active';
        }
        $ret[] = offon($n) . ' ' . btn($cx, lj('', 'rstr_params___' . $k . '_' . $n, $t)) . $hlp . br();
    }
    return divc('nbp', colonize($ret, 3, '', '', 550));
}
开发者ID:philum,项目名称:cms,代码行数:19,代码来源:adminx.php

示例13: uicon

    $meta["title"] = $_GET['admin'];
    $meta['favicon'] = uicon('screen_4to3_16', 'picol/16');
} elseif ($_GET["msql"]) {
    $meta["title"] = $_GET['msql'];
    $meta['favicon'] = uicon('database_16', 'picol/16');
} elseif ($_SESSION["read"]) {
    $meta["title"] = $_SESSION["raed"];
    $meta["descript"] = $_SESSION["descript"];
    $meta["img"] = $host . '/imgc/' . $_SESSION["imgrel"];
} else {
    $meta["title"] = $_SESSION['mn'][$_SESSION['qb']];
    $meta["descript"] = $_SESSION['qbin']["dscrp"];
}
//$meta["img"]=host().'/img/ban_'.$_SESSION['qb'].'.jpg';
$cst = $_SESSION['desgn'] ? '?' . randid() : '';
if ($_SESSION['mobile'] && rstr(63)) {
    $_SESSION['negcss'] = 1;
}
$meta['css'] = define_design();
verif_update();
//update
if ($_SESSION['dlnb']) {
    Head::add('jscode', sj('popup_update'));
}
if ($_POST['flow'] or rstr(39)) {
    $flow = 1;
}
#back_in_time
if (abs(ses('dayx') - ses('daya')) > 86400) {
    $_POST['popadm']['timetravel'] = lkc('txtyl', '/reload/' . ses('qb'), nms(82));
}
开发者ID:philum,项目名称:cms,代码行数:31,代码来源:sys.php

示例14: pub_art_b

function pub_art_b($id, $o)
{
    list($dy, $frm, $suj, $amg) = pecho_arts($id);
    if (rstr(32)) {
        $img = minimg($amg, "hb");
    }
    $lnk = urlread($id);
    return divc("txtcadr", lkc("", $lnk, $suj)) . divc("panel", read_msg($id, $o ? $o : 2));
}
开发者ID:philum,项目名称:cms,代码行数:9,代码来源:mod.php

示例15: css_link

$ret .= css_link('/css/_global.css' . $cst);
//css
$ret .= css_link('/css/_pictos.css' . $cst);
//icons
if ($_GET['admin'] or $_GET['msql']) {
    $ret .= css_link('/css/_admin.css');
} else {
    $ret .= css_link('/css/' . $meta["css"] . '.css' . $cst);
}
$ret .= js_code('cutat=' . $_SESSION['jbuffer'] . '; fixpop="' . $_SESSION['mobile'] . '"; 
fulpop="1"; read="' . $read . '"; flow="' . $flow . '";');
$ret .= js_link('/prog' . $g . '/ajx.js');
//ajax
$ret .= js_link('/prog' . $g . '/utils.js');
//js
if (rstr(100)) {
    $ret .= js_link('http://code.jquery.com/jquery-1.9.1.min.js');
}
if ($_SESSION['desgn']) {
    $ret .= js_link('/js/live.js#css');
}
$ret .= Head::get();
$ret .= '</head>' . "\n";
if ($_GET['admin']) {
    $sp = ' spellcheck="false"';
}
$ret .= '<body' . atb('onload', $onload) . ' onclick="clpop(event)" onmousemove="popslide(event)"' . $sp . '>' . "\n";
//
$ret .= divd('clbub', '') . "\n";
$ret .= $madmin;
$ret .= divd('desktop', '') . "\n";
开发者ID:philum,项目名称:cms,代码行数:31,代码来源:index.php


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