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


PHP bal函数代码示例

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


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

示例1: baz_u

function baz_u($d)
{
    list($ob, $op) = split_right(':', $d);
    list($od, $oq) = split_one('/', $op);
    //echo $ob.'-'.$od.'-'.$oq.br();
    if ($oq) {
        switch ($od) {
            case 'bal':
                return bal($oq, $ob);
                break;
            case 'plug':
                return plugin($oq, $ob);
                break;
        }
    } else {
        switch ($op) {
            case 'br':
                return br();
                break;
            case 'b':
                return bal($op, $ob);
                break;
            case 'u':
                return bal($op, $ob);
                break;
        }
    }
    return '(' . $d . ')';
}
开发者ID:philum,项目名称:cms,代码行数:29,代码来源:bazx.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: plug_rssin

function plug_rssin($u)
{
    req('pop,art,tri,spe');
    Head::add('jslink', '/prog/utils.js');
    if ($_GET['rssurl']) {
        foreach ($_GET as $k => $v) {
            if ($k == "rssurl") {
                $u = $v;
            } else {
                $u .= '&' . $k . '=' . $v;
            }
        }
    }
    $u = str_replace('http://', '', $u);
    if ($u) {
        $alx = alx();
        $rss = load_xml('http://' . $u, 1);
        $ret .= bal('h1', lkt('', 'http://' . $u, preplink($u)));
        $ret .= lkt("", '/?plug=rssin&rssurl=' . $u, picto('url'));
        foreach ($rss as $k => $v) {
            if ($v[1]) {
                $ret .= pane_base($v[1], $v[0], "", rss_date($v[2]), "", $v[3], $alx);
            }
        }
    }
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:27,代码来源:rssin.php

示例4: uds_btn

function uds_btn($r)
{
    $rb = array('vocable', 'name', 'planet', 'unit', 'math');
    $ret = $rb[$r[2]] ? ' (' . $rb[$r[2]] . ') ' : ' ';
    $ret .= lj('', 'popup_search___' . ajx($r[0]), picto('search', 16)) . ' ';
    if ($r[3]) {
        $ret .= ' [' . $r[3] . '] ';
    }
    $ret .= ud_glyphe($r[0]) . br();
    return hr() . bal('b', $r[0]) . $ret . divc('justy', nl2br(stripslashes($r[1])));
}
开发者ID:philum,项目名称:cms,代码行数:11,代码来源:umvoc.php

示例5: plug_deploy

function plug_deploy($deploy)
{
    $qb = $_SESSION['qb'];
    $USE = $_SESSION['USE'];
    $raed = suj_of_id($deploy);
    $nl = $_GET['nl'] ? $_GET['nl'] : "nl";
    if ($deploy && $USE) {
        //prep
        list($qauth, $subj) = sql('name,suj', 'qda', 'r', 'id="' . $deploy . '"');
        $msg = sql('msg', 'qdm', 'v', 'id="' . $deploy . '"');
        if ($USE == $qauth or auth(5)) {
            $http = host();
            if (!$_POST['dpl']) {
                reqp('mail');
                $qmail = mail_list_tosend();
                $ret .= form("/?read={$deploy}&deploy={$deploy}&nl=nlb", txarea('dpl" maxlength="1000', $qmail, 40, 10) . br() . checkbox("dpf", "ok", "html", 1) . checkbox("multiple", "ok", "each_one", 1) . input2('submit', "send", nms(50), 'popbt'));
            } else {
                $htacc = urlread($deploy);
                $_SESSION['nl'] = $nl;
                //deploy
                if ($_POST['dpf'] == "ok") {
                    $mail_format = "html";
                    $txt = format_txt($msg, $nl, $deploy);
                    $txt = html_entity_decode($txt);
                    $txt = str_replace('href="/', 'href="' . $http . '/', $txt);
                    $msg = lkc("", $http . $htacc, bal("h2", $subj));
                    $msg .= divc("panel justy", $txt);
                } else {
                    $mail_format = "txt";
                    $msg = clean_internaltag($msg);
                    $msg = html_entity_decode($msg);
                }
                $_SESSION['nl'] = "";
                //send
                $sender = sql('mail', 'qdu', 'v', 'name="' . $USE . '"');
                $lstm = str_replace("\n", ",", $_POST['dpl']);
                $lstm = str_replace("\r", ",", $lstm);
                $listmail = explode(",", trim($lstm));
                if ($_POST['multiple'] == "ok" && is_array($listmail)) {
                    $sentto = send_mail_r($listmail, $mail_format, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                } else {
                    $sentto = $_POST['dpl'];
                    $vm = str_replace(array(",", ";", "\n", " "), ",", $sentto);
                    send_mail($mail_format, $vm, $qb . ' :: ' . $raed, $msg, $sender, $htacc);
                }
                $ret .= lkc("popbt", '/?read=' . $deploy, 'article ' . $deploy . ' sent to: ' . $sentto);
            }
        } else {
            $ret .= btn("popdel", "forbidden");
        }
    }
    //if($_POST['dpl'])return $ret;
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:54,代码来源:deploy.php

示例6: readerurl

function readerurl($a, $b, $f)
{
    $f = ajxg($f);
    req('tri,pop');
    if ($f) {
        list($suj, $ret, $rec, $defid, $defs) = vacuum($f, '');
    }
    $ret = format_txt_r($ret, '3', '');
    $ret = nl2br(embed_p($ret));
    return bal('h2', $suj) . $ret;
}
开发者ID:philum,项目名称:cms,代码行数:11,代码来源:reader.php

示例7: plug_ummdico

function plug_ummdico($p, $o)
{
    //umm_sav();
    ses('qu', 'umm_dico');
    $ret = bal('h3', 'Recherche sur le dictionnaire des vocables');
    $ret .= input(1, 'search', '', '') . ' ';
    $ret .= checkbox('chk', '1', 'phonétique', 0);
    $ret .= lj('txtbox', 'ucbk_plug___ummdico_ud*search_1_2_search|chk', 'chercher') . br() . br();
    $ret .= divd('ucbk', '') . br();
    //callback
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:12,代码来源:ummdico.php

示例8: plug_gallery

function plug_gallery($q)
{
    if ($q == "gl") {
        $q = "";
    }
    $img_d = sql('img', 'qda', 'v', 'id="' . $_SESSION['read'] . '"');
    $img_d = substr($img_d, 0, 1) == '/' ? substr($img_d, 1) : $img_d;
    $img_d = str_replace("/", ",", $img_d);
    if ($q == "auto") {
        $s = "";
    } elseif ($q == "manual") {
        $s = $q;
        $imgs = str_replace(",", ",\n", $img_d);
    } elseif ($q == "dir") {
        $s = $q;
        $dirs = br() . plugin('dsnav', 'gl', 'users/' . $_SESSION['qb']);
    } else {
        $s = $q;
    }
    $ret .= bal("b", "source:") . ' ';
    if (!$q) {
        //gallerygl
        if ($img_d) {
            $ret .= lj('popbt', 'popup_gallery__x_auto', "auto") . ' ';
            $ret .= lj('popbt', 'popup_gallery__x_manual', "manual") . ' ';
        }
        $ret .= lj('popbt', 'popup_gallery__x_dir', "user/directory");
    } else {
        $ret .= lj("popbt", 'popup_gallery', $q == "dir" ? "user_directory" : $q);
    }
    if ($imgs) {
        $ret .= br() . txarea('dpl', $imgs, 40, 10, atd('source') . atc('popw') . ats('border:1px solid black'));
    }
    //pb name=src
    if ($dirs) {
        $ret .= $dirs;
    }
    if ($q != "dir" && $q) {
        $ret .= br() . bal("b", "type:") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'', "Thumbnails") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'2', "Ajax") . ' ';
        $ret .= ljb("popbt", "insert_photo", $s . '\',\'1', "Flash") . ' ';
        $ret .= lj("popbt", 'popup_slider_' . ($s == 'manual' ? 'source' : '') . '_3x_' . $s . '_' . $_SESSION['read'], "Slider") . ' ';
    }
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:46,代码来源:gallery.php

示例9: vmailsend

function vmailsend($id, $o, $res)
{
    req('pop,spe,tri,mod');
    $http = host();
    $htacc = urlread($id);
    list($from, $to, $txt, $suj) = ajxr($res);
    if (strpos($to, "@") !== false) {
        $suj = sql('suj', 'qda', 'v', 'id="' . $id . '"');
        $msg = divc("panel justy", $txt);
        $msg .= lkc("", $http . $htacc, bal("h2", $suj));
        $msg .= divc("panel justy", read_msg($id, "nlb"));
        send_mail("html", $to, $suj, $msg, $from ? $from : hostname(), $htacc);
        return btn("popbt", nms(34) . ' ' . nms(79) . ' ' . nms(36) . ': ' . $to);
    } else {
        return btn("popdel", 'error' . $to);
    }
}
开发者ID:philum,项目名称:cms,代码行数:17,代码来源:mail.php

示例10: umnb_j

function umnb_j($p, $o = '', $res = '')
{
    list($p, $o) = ajxp($res, $p, $o);
    //base 12
    $n = base_convert($p, 10, 12);
    //nominations base 6
    $r_c = array(0 => 'OU', 1 => 'I', 2 => 'I', 3 => 'I', 4 => 'I', 5 => 'I', 6 => 'O', 7 => 'O', 8 => 'O', 9 => 'O', 'a' => 'O', 'b' => 'O');
    //chiffres
    $r_u = array(0 => 'O', 1 => 'AS', 2 => 'EN', 3 => 'EDOO', 4 => 'ES', 5 => 'EGO', 6 => 'AEE', 7 => 'ANA', 8 => 'ANMA', 9 => 'ADA', 'a' => 'AS', 'b' => 'ADEN');
    //décimales
    $r_d = array(0 => '', 1 => 'D', 2 => 'K', 3 => '?', 4 => '?', 5 => '?');
    $r = str_split($n);
    //p($r);
    $nb = count($r);
    //nb de chiffres
    $ra = array($r_c, $r_u, $r_d);
    //theory
    //le zéro de chaque décimale base 12 est préfixé d'un incrément de demi-décimale $r_c: I, O
    $decimale12 = floor($p / 12);
    if ($decimale12 == $p / 12) {
        $indicatif_zero = $r_c[$decimale12];
    }
    //foreach($r as $k=>$v)$ren.=$umnb_pic($r[$i]).' ';
    for ($i = $nb - 1; $i >= 0; $i--) {
        $ren .= umnb_pic($r[$i]) . $r[$i] . br();
    }
    if ($nb == 1) {
        $res = $r_c[$r[0]] . '-' . $r_u[$r[0]];
    }
    if ($nb == 2) {
        $res = $r_d[$r[0]] . '' . $r_c[$r[1]] . '-' . $indicatif_zero . $r_u[$r[1]];
    }
    $ret = lka('/plug/umnb/' . $p, picto('link')) . ' ';
    $ret .= lj('', $o . '_plug__2_umnb_umnb*j_' . ($p - 1) . '_' . $o, picto('previous')) . ' ';
    $ret .= lj('', $o . '_plug__2_umnb_umnb*j_' . ($p + 1) . '_' . $o, picto('next')) . ' ';
    $ret .= bal('b', $p) . ' (' . bal('b', $n) . ' en base 12, décimale ' . $decimale12 . '): ';
    $ret .= bal('h3', $res);
    $ret .= $ren;
    return $ret;
}
开发者ID:philum,项目名称:cms,代码行数:40,代码来源:umnb.php

示例11: plug_rss

function plug_rss($hub, $preview)
{
    if ($hub) {
        $_GET['hub'] = $hub;
    }
    if ($preview == '=' or !$preview) {
        $preview = 2;
    }
    if (!$hub) {
        return slct_menus(ses('mn'), '/plug/rss/', '', '', '', 'kv');
    }
    require_once '../prog/lib.php';
    req('pop,art');
    require '../plug/sys.php';
    require '../plug/lib.php';
    $fnod = $_SESSION["qb"] . '_cache';
    $main = msql_read_b('users', $fnod, '', 1);
    $nb_arts = count($main);
    $lastid = lastid('qda');
    $last_art = $main[$lastid];
    $newest = key($main);
    $oldest = array_pop($main);
    $nb_days = round((time() - $oldest[0]) / 86400);
    $cache = 1;
    $f = '../plug/_data/' . $_SESSION["qb"] . '_' . $newest . '_' . $preview . '.xml';
    if (is_file($f) && !$_GET['rebuild'] && $cache) {
        return read_file($f);
    } else {
        $http = host();
        if ($preview) {
            req('tri,pop,art');
        }
        //spe,mod
        $xml .= '<' . '?xml version="1.0" encoding="iso-8859-1"?' . '>' . "\n";
        $xml .= '<rss version="2.0">' . "\n";
        $xml .= '<channel>' . "\n";
        $xml .= bal('title', $_SESSION['qb']) . "\n";
        $xml .= bal('link', $http) . "\n";
        $xml .= bal('description', $nb_arts . ' articles / ' . $nb_days . ' days - preview=' . $preview . ' - static url=' . $http . substr($f, 2)) . "\n";
        $xml .= bal('language', 'fr') . "\n";
        $xml .= bal('lastBuildDate', date("r", $last_art[0])) . "\n";
        if ($main) {
            $xml .= flux_xml($main, $preview) . "\n";
        }
        $xml .= '</channel>' . "\n";
        $xml .= '</rss>' . "\n";
        write_file($f, $xml);
        rss_del_old($newest);
    }
    //eye
    eye('rss');
    return $xml;
}
开发者ID:philum,项目名称:cms,代码行数:53,代码来源:rss.php

示例12: conn_icon

function conn_icon($v, $rp)
{
    $r = array('k' => 'strike', 'l' => 'small');
    if ($r[$v]) {
        return bal($r[$v], $v);
    }
    if ($v == 's') {
        return btn('stabilo', $v);
    }
    if ($v == 'r') {
        return btn('txtclr', $v);
    }
    return $rp[$v] ? picto($rp[$v], '16') : $v;
}
开发者ID:philum,项目名称:cms,代码行数:14,代码来源:art.php

示例13: plug_codeview

function plug_codeview($dr, $f, $fc = '')
{
    if ($dr == 'param') {
        $dr = $f = '';
    }
    require_once 'params/_connectx.php';
    if (!$f && $fc) {
        $f = sql_b('select page from _sys where name="' . $fc . '"', 'v');
    }
    if (strpos($f, '.') === false && $f) {
        $f .= '.php';
    }
    if ($fc == 'all') {
        $fc = '';
    }
    $ret .= lj('', 'codeview_plugin___codeview_' . $dr . '_' . $f . '_' . ajx($fc), picto('reload')) . ' ';
    if ($dr == 'save') {
        $_GET['sav'] = 1;
        $dr = $_SESSION['dr'];
        $dr == 'plug' ? savefunc_plug() : savefunc();
    } else {
        $_GET['sav'] = 0;
    }
    //if($dr=='all')$dr='';
    $dr = $dr ? $dr : 'progb';
    $_SESSION['dr'] = $dr;
    $_SESSION['file'] = $f;
    $_SESSION['func'] = $fc;
    if ($dr != 'params') {
        list($rep, $res) = functions_list($dr, $f);
    }
    if (auth(6)) {
        $ret .= btn('nbp', cv_btn('progb', $dr) . cv_btn('plug', $dr) . (auth(5) ? cv_btn('save', $dr) : '')) . ' ';
    }
    //cv_btn('all',$dr).
    $nbfunc = count($_SESSION['rec']);
    if (!$nbfunc) {
        $nbfunc = rse('COUNT(id)', '_sys');
    }
    $ret .= bal('small', $nbfunc . ' functions') . ' ';
    $jp = ajx(substrpos($f, '.'));
    //list
    if ($rep) {
        ksort($rep);
        array_unshift($rep, '...');
    } else {
        $rep[] = '...';
    }
    $ret .= slct_sj($rep, $f, 'codeview_plugin__15_codeview_' . ajx($dr) . '_');
    //page
    if ($f && auth(6)) {
        $ret .= lj('', 'popup_plupin___codev_' . $dr . '_' . $jp, picto('editxt')) . ' ';
        if ($dr == 'plug') {
            $ret .= lj('', 'popup_plupin___' . $jp, picto('window')) . ' ';
        }
    }
    //list
    $rec = array_values($_SESSION['rec']);
    array_unshift($rec, 'all');
    //if($rec)ksort($rec);
    if ($f) {
        $ret .= slct_sj($rec, $fc, 'codeview_plugin__15_codeview_' . ajx($dr) . '_' . ajx($f) . '_');
    }
    //func
    if ($fc && auth(6)) {
        $ret .= lj('', 'popup_plupin___codev_' . $dr . '_' . $jp . '_' . ajx($fc), picto('editxt')) . ' ';
        if ($dr == 'plug') {
            $ret .= lj('', 'popup_plup___' . $jp . '_' . ajx($fc), picto('window')) . ' ';
        }
    }
    //search
    $ret .= input1('funcsrch', $fc, 8) . ' ' . lj('popbt', 'popup_plup___codeview_findfunc___funcsrch', 'find') . ' ' . lj('popbt', 'popup_plup___coremap_coremap___funcsrch', 'map');
    if ($dr != 'save_all') {
        return divd('codeview', $rea . $ret . $res);
    }
}
开发者ID:philum,项目名称:cms,代码行数:76,代码来源:codeview.php

示例14: fav_art

function fav_art($id, $rtg = '')
{
    $im = minimg(sql('img', 'qda', 'v', 'id=' . $id), 'h');
    $day = sql('day', 'qda', 'v', 'id=' . $id);
    $dat = mkday($day) . ' ';
    if ($rtg) {
        $tag = fav_tag_maker($rtg) . ' ';
    }
    //$del=plugin('like',$id,1).' ';
    $suj = bal('h4', suj_of_id($id) . ' ');
    if ($id) {
        return divc('txtcadr', $im . $dat . $tag . $del . lj('', 'popup_popart__3_' . $id . '_3', $suj));
    }
}
开发者ID:philum,项目名称:cms,代码行数:14,代码来源:favs.php

示例15: current_step

function current_step($mn)
{
    $step = $_SESSION['step'];
    $menu = bal("p", $step . '. ' . $mn[$step]);
    $connect = test_connection();
    $c = "okay";
    switch ($mn[$step]) {
        case "directories":
            $l = list_of_dirs();
            foreach ($l as $k => $v) {
                if (!is_dir($v)) {
                    $no = "ok";
                }
            }
            if ($no) {
                $ret = instlink('make_dirs', '=');
            } else {
                $ret = $c;
            }
            break;
            //instlink('make_dirs','remove');
        //instlink('make_dirs','remove');
        case "phpini":
            $ret = 'php version: ' . $_SESSION['phpv'] . br();
            if ($_SESSION['phpv'] >= 5.3) {
                if (!is_file('.user.ini')) {
                    w_ini();
                    $ret .= 'php>5.3 : phpini a été installé, pour voir les erreurs';
                } else {
                    $ret = $c;
                }
            } else {
                $ret .= 'php<5.3 : phpini n\'a pas besoin d\'être installé';
            }
            break;
        case "connexion":
            if ($connect == 'pas de connexion') {
                $ret = instlink('connexion', '=');
            } else {
                $ret = $c;
            }
            break;
        case "databases":
            if ($connect != "pas de connexion") {
                if (!mysql_num_rows(mysql_query('SHOW TABLES'))) {
                    $ret = instlink('install_databases', '=');
                } else {
                    $ret = $c;
                }
            }
            w_master_p();
            break;
        case "program":
            $nbp = count($_SESSION['progam']);
            $_SESSION['progam'] = '';
            if (count(dl_dirs()) == $nbp) {
                $ret = $c;
            } else {
                $ret = dl_prog();
            }
            break;
        case "htaccess":
            if (!is_file('.htaccess')) {
                $ret = instlink('htacc', '=');
            } else {
                $ret = $c;
            }
            break;
        case "usefull":
            $ret = instlink('usefull', '=');
            break;
        case "philum":
            $ret = instlink('philum', '=');
            break;
        case "fin":
            $ret = 'Si ' . lien('/', 'tout va bien') . ', ' . lien('?fin==', 'auto-supprimer') . ' ce fichier';
            break;
    }
    return $menu . $ret;
}
开发者ID:philum,项目名称:cms,代码行数:80,代码来源:install.php


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