Esempio n. 1
0
File: stext.php Progetto: philum/cms
function st_paste($d)
{
    $ret = hidden('', 'cka', 'm' . $d);
    $ret .= ljb('" title="copy" id="cka1', 'mem_storage', '_m1___cka0', picto('copy')) . ' ';
    $ret .= ljb('" title="paste" id="ckb1', 'mem_storage', '_m1_1__ckb0', picto('paste'));
    return btn('nbp', $ret) . ' ';
}
Esempio n. 2
0
    public function render($label_template = '{title}', $back_url = NULL)
    {
        if (empty($this->mItems)) {
            return '<p>No records are found.</p>';
        } else {
            $html = box_open('Sort Order', 'primary');
            // Render form with alert message
            $html .= '<form action="' . current_url() . '" method="POST">';
            $html .= $this->CI->system_message->render();
            $html .= '<p>Drag and drop below items to sort them in ascending order:</p>';
            // Generate item list by CodeIgniter Template Parser
            $template = '<ul class="sortable list-group">
				{items}
				<li class="list-group-item">
					<strong>' . $label_template . '</strong>
					<input type="hidden" name="' . $this->mPostName . '[]" value="{id}" />
				</li>
				{/items}
			</ul>';
            $data = array('items' => $this->mItems);
            $html .= $this->CI->parser->parse_string($template, $data);
            if ($back_url != NULL) {
                $html .= btn('Back', $back_url, 'reply', 'bg-purple') . ' ';
            }
            $html .= btn_submit('Save');
            $html .= '</form>';
            $html .= box_close();
            return $html;
        }
    }
Esempio n. 3
0
function plug_microform($p, $id)
{
    $rid = 'mfr' . randid();
    //echo $p.'-'.$id;
    $nod = ses('mform', ses('qb') . '_microform_' . $id);
    req('pop');
    ses('mformj', $rid . '_plug___microform_plug*microform_' . ajx($p) . '_' . $id);
    reqp('msql');
    $msq = new msql('', $nod);
    //table
    list($p, $tp) = explode('§', $p);
    $rb = mform_mr($p);
    //p($rb);
    $msq->create($rb);
    $ret .= make_form($p, 'mfr' . $id, '_plug___microform_mform*j_' . ajx($p, '') . '_' . $id . '_') . br();
    if (auth(4)) {
        $ret .= msqlink('users', ses('mform')) . ' ' . btn('txtsmall2', $nod) . ' ';
    }
    if ($tp == 1) {
        $ret .= mform_read($id);
    } elseif ($tp) {
        $ret .= plugin('msqtemplate', $nod, $tp);
    }
    return divd($rid, $ret . $bt);
}
Esempio n. 4
0
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;
}
Esempio n. 5
0
function taxonav_read($p)
{
    req('spe');
    list($h, $i, $o) = explode('|', $p);
    $r = collect_hierarchie_d("reverse");
    $r = tri_hierarchic($r, $h);
    //p($r);
    if (substr($i, 0, 1) == 'x') {
        $i = substr($i, 1);
    } else {
        $i = 'x' . $i;
        $op = 'x';
    }
    if ($op) {
        $p = '&#9660;';
    } else {
        $p = '&#9658;';
    }
    //down-right //
    $nb = btn('txtsmall2', '(' . count($r) . ')');
    $ret = balc("li", '" style="list-style-type:none;', '&#9500;&#150;' . good_gb($h, $i, $p) . ' ' . $nb);
    if ($r) {
        return $ret . balc("ul", "taxonomy", make_menus_rb($r, $h, $op, $o));
    }
}
Esempio n. 6
0
File: radio.php Progetto: philum/cms
function radio_edit($nod, $dr, $md, $id = '')
{
    $id = $id ? $id : $_SESSION['read'];
    $nd = 'radio' . $id;
    if (!$nod) {
        $nod = $_SESSION['qb'] . '_' . $nd;
    }
    $nodb = str_replace('_', '*', $nod);
    if ($dr) {
        $ret .= radio_build($dr, $nod);
    }
    $r = msql_read('radio', $nod, '');
    $ret .= msqlink('radio', $_SESSION['qb'] . '_' . $nd);
    if ($r[$md]) {
        foreach ($r[$md] as $k => $v) {
            $ky .= $md . '.' . $k . '|';
            $edit .= input2('text', '"id="' . $md . '.' . $k, $v) . btn('txtsmall', $r['_menus_'][$k]) . br();
        }
        $edit .= ljb('popbt', 'SaveR', 'popup_radiosav_' . $nodb . '__' . $k . '\',\'' . $ky, 'save');
    }
    $ret .= divc('edit', $edit);
    if ($r) {
        foreach ($r as $k => $v) {
            foreach ($v as $ka => $va) {
                $datas[$k][] = $va;
            }
            if ($k != '_menus_' && $k != $md) {
                $datas[$k][] = ljb('popbt', 'SaveJ', 'popup_radioedit___' . $nodb . '__' . $k, 'edit');
            }
        }
    }
    $ret .= make_divtable($datas);
    return popup('build_playlist', $ret);
}
Esempio n. 7
0
File: txt.php Progetto: philum/cms
function st_paste($d)
{
    $ret = hidden('', 'cka', 'm' . $d);
    $ret .= ljb('" title="' . nms(57) . '" id="cka1', 'mem_storage', '_m1___cka0', picto('save')) . ' ';
    $ret .= ljb('" title="' . nms(95) . '" id="ckb1', 'mem_storage', '_m1_1__ckb0', picto('refresh')) . ' ';
    $ret .= hlpbt('memstorage');
    return btn('nbp', $ret) . ' ';
}
Esempio n. 8
0
File: ftext.php Progetto: philum/cms
function ftext_j($n, $b, $res)
{
    $nd = stext_log();
    $rb = ajxr($res);
    $ra = array(mkday(), html_entity_decode_b($rb[0]));
    //p($ra);
    msql_modif('users', $nd . '_txt_' . $n, $ra, '', 'one', 1);
    return btn('txtyl', 'ok');
}
Esempio n. 9
0
 public function blog_category()
 {
     $crud = $this->crud->generate_crud('demo_blog_categories');
     $crud->columns('title');
     $this->mTitle .= 'Blog Categories';
     $this->mViewData['crud_note'] = btn('Sort Order', 'demo/blog_category_sortable');
     $this->mViewData['crud_data'] = $this->crud->render();
     $this->render('crud');
 }
Esempio n. 10
0
File: reset.php Progetto: philum/cms
function plug_reset()
{
    //session_destroy(); $_SESSION=''; $_SESSION['dev']='dev';
    $r = array('qd', 'qb', 'USE', 'iq', 'dev');
    foreach ($r as $v) {
        $ret[$v] = $_SESSION[$v];
    }
    $_SESSION = $ret;
    return btn('txtyl', 'all sessions were killed');
}
Esempio n. 11
0
function pictos_edit($k)
{
    //echo $k;
    $d = msql_read('system', 'program_pictos', $k);
    $ret = btn('txtsmall', $k) . ' ' . input(1, 'edit' . $k . '" size="30', $d);
    $ret .= lj('txtbox', 'ico' . $k . '_plug__x_pictos_pictos*save_' . $k . '__edit' . $k, 'save') . ' ';
    $ret .= lj('txtyl', 'ico' . $k . '_plug__x_pictos_pictos*save_' . $k, 'del') . br() . br();
    //$ret.=sesmk('pictos_see','edit'.$k,0);
    return popup('edit_picto', $ret);
}
Esempio n. 12
0
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;
}
Esempio n. 13
0
File: ftp.php Progetto: philum/cms
function ftp_ops($p, $f)
{
    $rid = 'inp' . randid();
    $j = 'ops' . $rid . '_plug__2_ftp_ftp*act_' . ajx($p) . '_' . ajx($f) . '_' . $rid;
    if ($p == 'rename' or $p == 'copy') {
        $ret = input(1, $rid, $f, '', '', 16) . ' ';
    } else {
        $ret = hidden('', $rid, $f) . btn('txtx', $f) . ' ';
    }
    $ret .= lj('popbt', $j, pictxt('reload', $p));
    return $ret . divd('ops' . $rid, '');
}
Esempio n. 14
0
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;
    }
}
Esempio n. 15
0
File: mysqm.php Progetto: philum/cms
function mq_tables($p, $o, $res = '')
{
    list($p, $o) = ajxp($res, $p, $o);
    $r = lstrc(rcptb($p));
    if ($r) {
        foreach ($r as $v) {
            $ret .= lj('', 'mqm_plug___mysqm_mq*cols_' . ajx($v) . '_' . ajx($p), $v);
        }
    }
    //$ret=walkeach($r,'mqt_w',$p);implode('',)
    return btn('list', $ret);
}
Esempio n. 16
0
File: plug.php Progetto: philum/cms
function plug_hlp($d)
{
    $r = msql_read('system', 'program_plugs', $d, '1');
    $v = $r[0];
    $hlp = msql_read('lang', 'program_plugs', $d);
    $ret = btn('small', $r[1] . '/' . $d . ' (' . $v . ')') . ' ';
    //$ret.=lj('grey','bubble_text___'.ajx($v).'_'.$hlp,picto('help'));
    //$ret.=bubble('grey','text',ajx($v).'_'.$hlp,picto('help'));
    if ($hlp) {
        $ret .= togbub('text', ajx($hlp) . '__panel', btn('grey', picto('help'))) . ' ';
    }
    return $ret;
}
Esempio n. 17
0
function f_inp_widths($defs)
{
    $set = 'text" size="3';
    list($l_large, $m_large, $r_large, $t_large) = obtain_widths($defs);
    $t .= btn("txtnoir", 'leftbar ' . input2($set, 'l_large', $l_large, "")) . ' ';
    $t .= btn("txtnoir", 'content ' . $m_large . 'px') . ' ';
    $t .= btn("txtnoir", 'rightbar ' . input2($set, 'r_large', $r_large, "")) . ' ';
    $t .= btn("txtnoir", 'page ' . input2($set, 't_total', $t_large, "")) . ' ';
    $t .= input2('submit', 'save', "apply_widths", "") . ' ';
    $t .= checkbox('saveblocks', 'ok', 'apply (mods_' . prmb(1) . ')', 0) . ' ';
    $t .= hlpbt('designwidths') . br();
    $inp = $t . br();
    return form('/?admin=css', $inp);
}
Esempio n. 18
0
function ud_search($p, $o, $res)
{
    list($p, $o) = ajxr($res);
    if ($o == 'yes') {
        $r = sql('*', 'qu', '', 'ex=soundex("' . $p . '") order by voc asc');
    } else {
        $r = sql('*', 'qu', '', 'voc like "%' . $p . '%" order by voc asc');
    }
    $ret = btn('txtsmall', count($r) . ' résultats') . br();
    if ($r) {
        foreach ($r as $k => $v) {
            $ret .= uds_btn($v);
        }
    }
    return $ret;
}
Esempio n. 19
0
File: codev.php Progetto: philum/cms
function codsav($p, $o, $res)
{
    $d = ajxg($res);
    //echo $p;
    if ($p) {
        list($dr, $pg, $fc) = explode("|", $p);
    }
    $f = ($dr == 'plug' ? '' . $dr : 'progb') . '/' . $pg;
    if ($fc) {
        return func_sav($p, '', $res);
    }
    $d = '<' . '?php' . "\n" . $d . "\n" . '?' . '>';
    if ($_SESSION['auth'] > 6) {
        write_file($f, $d);
        return btn('txtyl', 'saved');
    }
}
Esempio n. 20
0
function calendar_build($time, $to, $res = '')
{
    $rid = 'cld' . randid();
    $time = $time ? $time : time();
    $gd = getdate($time);
    $month = $gd['mon'];
    if (strlen($month) == 1) {
        $month = '0' . $month;
    }
    $first = date('w', mktime(1, 1, 1, $month, 1, $gd['year']));
    if ($first == 0) {
        $first = 7;
    }
    $nbdy = date('t', mktime(1, 1, 1, $month, 1, $gd['year']));
    $j = $rid . '_plug___calendar_calendar*build_';
    $ret = lj('', $j . ($time - 2592000) . '_' . $to, picto('left'));
    $ret .= btn('poph', $month . '/' . $gd['year']);
    $ret .= lj('', $j . ($time + 2592000) . '_' . $to, picto('right'));
    $ret .= '<table>';
    $today = date('dmy', time());
    for ($a = 1; $a < $first; $a++) {
        $ret .= '<td></td>';
    }
    for ($i = 1; $i <= $nbdy; $i++) {
        $mk = mktime(0, 0, 0, $month, $i, $gd['year']);
        $day = date('d', $mk);
        if (date('dmy', $mk) == $today) {
            $c = ' txtclr';
        } else {
            $c = '';
        }
        $date = $gd['year'] . '-' . $month . '-' . $day . '-' . $gd['hours'] . '-' . $gd['minutes'];
        $bt = lj('lina' . $c, $to . '_plug__4x_calendar_calendar*j_' . $date, $day) . "\n";
        $ret .= '<td>' . $bt . '</td>';
        $a++;
        if ($a == 8) {
            $a = 1;
            $ret .= '</tr><tr>';
        }
    }
    $ret .= '</tr></table>';
    return divd($rid, $ret);
}
Esempio n. 21
0
File: piclr.php Progetto: philum/cms
function piclr_build($p)
{
    $ra = msql_read('system', 'edition_colors', '', 1);
    //foreach($ra as $k=>$v)$rb[$i]=$v;
    $rb = array_keys($ra);
    $rand = array(4, 12, 24, 78, 14, 19, 44, 21, 32, 79);
    for ($i = 0; $i < 10; $i++) {
        $css .= '.clr' . $i . '{background-color:' . $rb[$rand[$i]] . ';}' . "\n";
    }
    echo css_code($css);
    $pi = msql_read('', 'public_pi', '1', 1);
    $pi = substr($pi, 0, $p);
    //bcscale(20);
    $r = str_split(substr($pi, 2));
    foreach ($r as $k => $v) {
        $ret .= btn('clr' . $v, $v) . " \n";
    }
    return $ret;
}
Esempio n. 22
0
File: login.php Progetto: philum/cms
function plug_login($p)
{
    req('pop');
    //return loged_j($_SESSION["USE"],$_SESSION["iq"],$t,10);
    $w = '.' . $_SERVER['HTTP_HOST'];
    $in .= divc('popbt', helps('new_user')) . br();
    $in .= balise("input", array(1 => "text", 2 => "user", 3 => "lgg", 8 => "log_finger('lgg');"), "") . ' ';
    if ($_SESSION["prmb"][11] > 5) {
        $in .= balise("label", array("for" => 'login', 6 => 15), $w) . br();
    } else {
        $in .= btn('" id="valid', nms(135)) . br() . br();
    }
    $in .= balise("input", array(1 => "text", 2 => "pass"), "") . ' ';
    $in .= balise("label", array("for" => 'pass', 6 => 15), nms(137)) . br() . br();
    $in .= balise("input", array(1 => "text", 2 => "mail"), "") . ' ';
    $in .= balise("label", array("for" => 'mail', 6 => 15), nms(136)) . br() . br();
    $in .= submitj('txtx', "login", nms(57));
    return '<form id="login" method="post" action="" onKeyPress="checkEnter(event,\'login\')">' . $in . ' </form>';
}
Esempio n. 23
0
function plug_htaccess($d)
{
    $here = 'htaccess';
    $default = msql_read('system', 'default_htaccess', 1);
    $actual = read_file('.' . $here);
    if (!$actual or $d) {
        $actual = $default;
        $ret .= btn('txtyl', 'default_loaded') . br();
    }
    $ret .= picto('alert�24') . ' ' . btn('txtcadr', 'critical_operations') . ' ';
    $ret .= lj('txtbox', 'txt_plug__4_' . $here . '_' . $here . '*default', 'default') . ' ';
    $ret .= lj('txtbox', 'cbk_plug__xd_' . $here . '_' . $here . '*mkdefault___txt', 'backup') . ' ';
    $ret .= msqlink('system', 'default_htaccess') . ' ';
    $ret .= lkc('txtx', '.htaccess', 'link') . ' ';
    $ret .= hlpbt('htaccess') . ' ' . btd('cbk', '') . ' ';
    $ret .= btd('bts', lj('txtbox', 'cbk_plug__xd_' . $here . '_' . $here . '*j___txt', 'save')) . br() . br();
    $ret .= txarea('txt', $actual, 120, 26) . br();
    $ret .= lkt('txtblc', 'http://htaccess.madewithlove.be/', 'tests');
    return $ret;
}
Esempio n. 24
0
function sugg_rapport($m)
{
    $r = read_vars('msql/users/', nod('suggest'), '');
    if ($r) {
        foreach ($r as $k => $v) {
            $id = '';
            if ($v[3]) {
                $id = sql('id', 'qda', 'v', 'mail="' . $v[3] . '"');
            }
            if ($id) {
                $art = lj('popw', 'popup_popart__3_' . $id . '_3', nms(89));
            }
            $pub = $v[1] ? $art : btn('popbt', nms(56));
            if ($v[3] == $m) {
                $ra[] = array($v[0], plink($v[2]), $pub);
            }
        }
    }
    return btn('txtcadr', 'rapport') . br() . make_divtable($ra);
}
Esempio n. 25
0
File: cart.php Progetto: philum/cms
function plug_cart()
{
    if ($_GET["del"]) {
        unset($_SESSION['cart'][$_GET["del"]]);
    }
    $ar[] = array("", "réf", "titre", "prix", "qté", "sub_total", "x");
    //"ancien prix","remise",
    if ($_SESSION['cart']) {
        foreach ($_SESSION['cart'] as $k => $v) {
            $save .= $k . '=' . $v . ';' . "\r";
            list($day, $frm, $tit, $amg, $nod, $tag, $lu, $re, $host, $mail, $ib) = pecho_arts($k);
            list($prx, $ref, $stock) = prod_from_art($k);
            //,$reduc,$descript
            $tit = lkc("txtcadr", good_url($k, 'read'), $tit) . '' . br();
            $img = minimg($amg, 1) . br();
            //if($reduc){$oldprice=$prix;$prx=round($prix*($reduc/100));}
            //else{$oldprice="";$prx=$prix;}//prix
            $qte = qtes($k, $v);
            $erz = lkc('', '?plug=cart&del=' . $k, 'x');
            $ar[] = array($img, $ref, $tit, $prx, $qte, $prx * $qte, $erz);
            //$oldprice,$reduc,
            $total += $prx * $qte;
        }
        $_SESSION["prixtotal"] = $total;
        $ar[] = array("", "", "", "", "total", $total);
        //"","",
        $tb = make_table($ar, 'txtred', '');
        //$tb=str_replace("table",'table width="100%"',$tb);
        $tb = str_replace("td", 'td class="txtblc" align="center"', $tb);
        //$_SESSION["commande"]=$tb;
        $ret = $tb . br();
        $ret .= ljb('txtbox', 'jumpval', 'ref5_command::' . $save, $_SESSION['nms'][27]) . br() . br();
        $ret .= nl2br(make_form_fromstring('::Name=input::Adress=input::city=input::Email=input::Message=text', ''));
    } else {
        $ret = btn("txtred", "empty_cart");
    }
    return $ret;
}
Esempio n. 26
0
File: del.php Progetto: philum/cms
function delj($p, $o, $res)
{
    $f = ajxg($res);
    if (!auth(7)) {
        return 'no';
    }
    if ($p == 'file') {
        if (is_file($f)) {
            unlink($f);
        } else {
            return 'error';
        }
    }
    if ($p == 'dir' && $f && strpos($f, '/') != false) {
        echo $f;
        if (is_dir($f)) {
            rmdir_r($f);
        } else {
            return 'error';
        }
    }
    return btn('txtyl', $p . ' ' . $f . ': deleted');
}
Esempio n. 27
0
File: chat.php Progetto: philum/cms
function chatread($p)
{
    $nm = ses('muse');
    $c = 'txtsmall';
    $r = chatdata($p);
    if ($r) {
        $r = array_reverse_b($r, 50);
        foreach ($r as $k => $v) {
            $erz = '';
            $msg = $v[2];
            if ($nm == $v[1] or auth(6)) {
                $erz = lj($c, 'cht' . $p . '_chat___chaterz_' . $p . '_' . $k, '(x)');
            }
            $bt = btn('popbt', $v[1]) . ' ' . btn($c . '2', mkday($v[0], 'dhi')) . $erz . br();
            if (!function_exists('miniconn')) {
                req('tri,pop,spe');
            }
            $msg = miniconn($msg);
            $ret .= divc('track', $bt . $msg);
        }
    }
    return scroll($r, $ret, 7);
}
Esempio n. 28
0
<div id="btn_menu">
<?php 
if ($is_mypage) {
    echo btn(term('album', 'form.create'), 'album/create', 'mr', true, null, null, null, 'plus', null, null, false);
}
$name = $is_mypage ? '自分' : member_name($member) . 'さん';
$controller = Site_Util::get_controller_name();
if ($controller == 'album') {
    echo btn(sprintf('%sの%sを全て見る', $name, term('album_image')), sprintf('album/member/%d/images', $member->id), 'mr', true, null, null, null, 'picture', null, null, false);
} elseif ($controller == 'image') {
    echo btn(sprintf('%sの%sを全て見る', $name, term('album')), sprintf('album/member/%d', $member->id), 'mr', true, null, null, null, 'picture', null, null, false);
}
?>
</div>
Esempio n. 29
0
File: book.php Progetto: philum/cms
function plug_book($iq, $id)
{
    bk_rq();
    Head::add('csscode', book_css());
    Head::add('jscode', book_js());
    $_SESSION['book'] = $iq;
    if (!is_numeric($iq)) {
        list($r, $rb) = book_builder($iq);
    } else {
        $r = sql('ib', 'qdd', 'k', 'msg="' . $iq . '" and val="fav"');
    }
    if (!$r) {
        return;
    } else {
        $_SESSION['bookr'] = $r;
    }
    $d = implode(' ', $r);
    $here = 'book';
    $id = $id ? $id : $_SESSION['read'];
    $rid = randid();
    //if(!$id)
    $rb['opt'] = lj('', 'popup_plup___book_book*ifr_' . $iq, pictxt('get', 'iframe'));
    foreach ($r as $k => $v) {
        $i++;
        if ($oi) {
            $io = $i . '. ';
        }
        $lk = 'book' . $rid . '_plug__2_book_book*read_' . $k . '_' . $rid;
        $lgh = art_length(sql('host', 'qda', 'v', 'id="' . $k . '"'));
        $msg .= lj('', $lk, picto('kright') . ' ' . $io . suj_of_id($k) . btn('small', ' (' . $lgh . ')')) . br();
    }
    $rb['msg'] = scroll_c($msg, $rid);
    $ret = divd('book' . $rid, template($rb, 'book'));
    $_SESSION['cur_div'] = 'content';
    return $ret;
}
Esempio n. 30
0
function plug_reboot()
{
    echo system('service apache2 restart');
    return btn('txtyl', 'server restarted');
}