示例#1
0
文件: philumsize.php 项目: philum/cms
function plug_philumsize($p = '', $o = '')
{
    $dr = $p ? $p : 'progb';
    //_old/
    $r = explore($dr, 'files', 1);
    $nm = date('ym');
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v != '_trash.php') {
                $f = $dr . '/' . $v;
                $v = read_file($f);
                $ret[nbf][$k] = substr_count($v, 'function ');
                $ret[siz][$k] = filesize($f);
            }
        }
    }
    if ($ret[nbf]) {
        $nbf = array_sum($ret[nbf]);
    }
    if ($ret[siz]) {
        $siz = round(array_sum($ret[siz]) / 1024, 2);
    }
    //$exs=msql_read('system','program_sizes',$nm); if(!$exs)//eco($exs);
    modif_vars('system', 'program_sizes', array(round($siz), $nbf), $nm);
    $ret = ' ' . $nbf . ' functions / ' . $siz . ' Ko';
    return $ret;
}
示例#2
0
文件: dev2prod.php 项目: philum/cms
function plug_dev2prod($p, $o)
{
    $r = explore('progb', 'files', 1);
    $old = '_old/' . date('ymd') . '/';
    mkdir_r($old);
    $olb = '_old/' . date('ym') . '/';
    mkdir_r($olb);
    foreach ($r as $k => $v) {
        if ($v != '_trash.php') {
            $fa = 'progb/' . $v;
            $da = filemtime($fa);
            $sa = filesize($fa);
            $fb = 'prog/' . $v;
            $db = filemtime($fb);
            $sb = filesize($fb);
            if (date('d') == '01') {
                copy($fb, $olb . $v);
            }
            if ($sa != $sb or $da > $db) {
                copy($fb, $old . $v);
                copy($fa, $fb);
                $ret .= strdeb($v, '.') . ' ';
            }
        }
    }
    return $ret;
}
示例#3
0
文件: ifrm.php 项目: philum/cms
function ifrgz($dr)
{
    $r = explore($dr);
    $f = 'users/public/ifr' . date('ymd') . '.tar';
    if (!is_file($f)) {
        $ret = plugin('tar', $f, $dr);
    }
    rmdir_r($dr);
    return $ret;
}
示例#4
0
文件: pictos.php 项目: philum/cms
function pictos_see($id)
{
    $r = explore('imgb/icons/svg/noun');
    asort($r);
    foreach ($r as $k => $v) {
        $im = svg('/noun/' . substr($v, 0, -4) . '§24') . ' ';
        $ret .= ljb('popbt', 'jumpvalue', $id . '_noun/' . $v, $im) . ' ';
    }
    return divd('scroll', $ret);
}
示例#5
0
function find()
{
    header('Content-Type: text/html; charset=utf-8');
    if (isset($_GET['type']) && $_GET['type'] != null && (isset($_GET['parameter']) && $_GET['parameter'] != null)) {
        //echo "find aperto";
        explore('https://www.mashape.com/explore' . switch_type($_GET['type']) . $_GET['parameter']);
    } else {
        $data = array('Error' => 'Erorr in Query');
        echo json_encode($data);
    }
}
示例#6
0
function sw($q)
{
    switch ($q) {
        case "find":
            find();
            break;
        case "explore":
            explore("https://www.mashape.com/explore");
            break;
    }
    //  print_r(error_get_last());
}
示例#7
0
文件: dirsize.php 项目: philum/cms
function plug_dirsize($p)
{
    $dr = $p;
    $r = explore($dr, 'files', 1);
    if ($r) {
        foreach ($r as $k => $v) {
            if ($v != '_trash.php') {
                $ret += filesize($dr . '/' . $v);
            }
        }
    }
    return round($ret / 1024);
}
示例#8
0
文件: countfiles.php 项目: philum/cms
function plug_countfiles($d)
{
    $r = explore($d, 'files', 1);
    if ($r) {
        foreach ($r as $k => $v) {
            if (is_array($v)) {
                $ret += count($v);
            } else {
                $ret += 1;
            }
        }
    }
    return $ret;
}
示例#9
0
文件: dir2table.php 项目: philum/cms
function plug_dir2table($d, $p)
{
    $r = explore($d);
    //p($r);
    list($dr, $nod) = split_right('/', $p, '');
    if ($r) {
        msql_modif($dr, $nod, msq_prep($r), array('src'), 'add', 'mdf');
    }
    $rb = msql_read($dr, $nod, '');
    if (!$rb) {
        return 'error';
    }
    //p($rb); //1d_array
    return make_tables('', msq_prep($rb), $csa, $csb);
}
示例#10
0
文件: photovr.php 项目: philum/cms
function plug_photovr($p, $o)
{
    //echo $p;
    $dr = 'users/' . $p;
    //echo $_SESSION['prmb'][27];
    list($wa, $ha) = split('/', $_SESSION['prmb'][27]);
    $wab = $ha * 2;
    $hab = $wab * ($ha / $wa);
    $r = explore($dr, 'files', 0);
    //$rb=photok_batch($r,$dr,$ha,$wa,$hab,$wab);
    $rb = photovr_batch($r, $dr, $wa, $ha, $wab, $hab);
    if ($rb) {
        $ret = implode($rb);
    }
    return $ret;
}
function display_sub_dirs($current_dir, $sub_dirs)
{
    $results = explore($current_dir, $sub_dirs, 1);
    foreach ($results as $r) {
        echo '<tr id = "row" data-file="' . $r[0] . '" data-type="dir">
				<td id = "thumbnail_container" width = "14%"><div id = "thumbs">';
        $is_dir = check_dir_exists($current_dir, $r[0]);
        $margin = 10;
        $img_id = 1;
        foreach ($r[1] as $thumbs) {
            $thumb_exists = false;
            $thumb_exists = check_thumb_exists($current_dir . $r[0] . '/' . $thumbs);
            $img_path = \OCP\Util::linkTo('reader', 'ajax/thumbnail.php') . '&filepath=' . urlencode($current_dir . $r[0] . '/' . rtrim($thumbs, 'pdf') . 'png');
            $counter = 3;
            for ($i = 1; $i <= $counter; $i++) {
                echo '<img id = "' . $current_dir . $r[0] . '/' . $thumbs . '" src = "' . $img_path . '" value = "' . $thumb_exists . '" style = "position:absolute;top:-55px;left:10px;margin-left:' . $margin . 'px; z-index:' . (50 - $margin) . ';"/>';
                $margin = $margin + 5;
                $img_id = $img_id + 1;
            }
        }
        echo '</div></td>';
        echo '<td class = "filename svg" width = "86%">
					<a class = "dirs" id = "' . $r[0] . '" href = "' . OCP\Util::linkTo('reader', 'index.php') . '&dir=' . $current_dir . $r[0] . '/' . '">
						<span class = "nametext">' . htmlspecialchars($r[0]) . '</span>
					</a>
					<div id = "more_info" style = "color:#666;margin-left:15px;margin-top:35px; vertical-align:bottom">';
        echo "Browse in for";
        echo '<br>';
        $dir_browse_results = explore($current_dir, array($r[0]), 5);
        foreach ($dir_browse_results as $browse_result) {
            foreach ($browse_result[1] as $each) {
                $each_sub_dir = explode("/", $each);
                if (count($each_sub_dir) > 1) {
                    foreach ($each_sub_dir as $element) {
                        echo '<span style = "color:#DDD;">>></span>' . $element;
                    }
                } else {
                    echo '<span style = "color:#DDD;"> >></span>' . $each;
                }
                echo '<br>';
            }
        }
        echo '</div> 
			</td>
		</tr>';
    }
}
示例#12
0
文件: ftp.php 项目: philum/cms
function ftp_j($p, $o, $res = '')
{
    list($p, $o) = ajxp($res, $p, $o);
    //$p='/'.$p;
    if ($p) {
        ses('pp', $p);
    }
    $r = explore($p, '', 1);
    //pr($r);
    if ($r) {
        foreach ($r as $k => $v) {
            //p,v,f,t
            $rb[$k] = array($p, $v, $p . '/' . $v, strdeb($v, '.'));
        }
    }
    return ftp_render($rb);
}
示例#13
0
function explore($dir)
{
    $html = '';
    if (0 < count($content = glob($dir . '/*'))) {
        $html .= '<ul>';
        foreach ($content as $f) {
            if ('_' != substr(basename($f), 0, 1)) {
                $file = substr($f, strlen(PROJECT_PUBLIC));
                if (!is_dir($f)) {
                    $html .= '<li><a href="' . $file . '">' . basename($file) . '</a></li>';
                } else {
                    $html .= '<li>' . basename($file) . explore($f) . '</li>';
                }
            }
        }
        $html .= '</ul>';
    }
    return $html;
}
示例#14
0
文件: radio.php 项目: philum/cms
function radio_build($dr, $nod)
{
    $dr = 'users/' . ajx($dr, 1);
    $sqdir = 'msql/radio/';
    if (!is_dir($sqdir)) {
        mkdir($sqdir);
    }
    $nod = $_SESSION['qb'] . '_radio' . $_SESSION['read'];
    $file = $sqdir . $nod . '.php';
    $ret['_menus_'] = array('prog', 'file', 'length', 'title', 'txt', 'img');
    $r = explore($dr);
    if ($r) {
        foreach ($r as $k => $v) {
            $ret[$k + 1] = array('0', $dr . '/' . $v, '0', $v, '', '');
        }
    }
    save_vars($sqdir, $nod, $ret);
    return ljb("popbt", "insert", '[' . $nod . ':radio]', "insert") . ' ';
}
示例#15
0
文件: coreflush.php 项目: philum/cms
function detect_plugs()
{
    $dr = 'plug/';
    $r = msql_read('system', 'program_plugs', '', 1);
    //p($r);
    $rec = explore($dr, files, 1);
    //p($rec);
    foreach ($rec as $k => $v) {
        $f = $dr . $v;
        $vb = strdeb($v, '.');
        $xt = xt($v);
        $rc = $r[$vb];
        $bo = detect_plugable($f, $vb);
        $iface = $rc[4];
        //?$rc[4]:detect_interface($f,$vb);
        $pb = substr($v, 0, 1) == '_' ? '1' : '';
        if (is_file($f) && $v && $vb && $xt == '.php') {
            if (!$rc) {
                $na++;
            }
            $rb[$vb] = array($rc[0], $rc[1], $bo ? $bo : '0', $rc[3], $iface, $rc[5], $pb);
        }
        //$vr,
        if (is_file($f) && $v && $vb) {
            $rd[$vb] = array($rc[0]);
        }
    }
    //$rb=msq_reorder($rb);//p($rb);
    ksort($rb);
    //p($rf);
    $rh = array('usage', 'dir', 'loadable', 'callable', 'interface', 'state', 'private');
    //'vars',
    msql_save('system', 'program_plugs', $rb, $rh);
    //,'input','output'
    ///?msql=lang/eng/program_plugs&update==
    update_table_lang($rd, 'program_plugs', 'fr', array('usage'));
    update_table_lang($rd, 'program_plugs', 'eng', array('usage'));
    return 'program_plugs: added:' . ($na ? $na : 0) . ', deleted:' . (count($r) - count($rb)) . br();
}
示例#16
0
<?php

require_once "../main.php";
try {
    $Client = new REST_CLIENT();
    $Client->setMethod(REST_CLIENT::METHOD_GET);
    // This is not required because the default method is GET
    $result = $Client->request('http://marketplace.envato.com/api/v2/popular:codecanyon.json', REST_CLIENT::CONTENT_JSON);
    explore($result);
    // Show results
    /*foreach($result->popular->authors_last_month as $user) {
    		echo '<a href="' . $user->url . '"><img src="' . $user->image . '" alt="' . $user->item . '" /></a>';
    	}*/
} catch (Exception $e) {
    echo 'Envato seems to be offline!';
}
示例#17
0
文件: pop.php 项目: philum/cms
function isgoodhubname($user)
{
    $dir = "users/";
    //$user=normalize($user);
    if ($_SESSION['qbin']['membrs'][$user]) {
        return true;
    }
    $iq = ser("id", $_SESSION['qdu'] . ' WHERE name="' . $user . '"');
    if ($iq) {
        return true;
    }
    $r = explore($dir, 'dirs', 1);
    if ($r[$user]) {
        return true;
    }
}
示例#18
0
文件: styl.php 项目: philum/cms
function charge_sets($d)
{
    //select-herit
    $qb = $_SESSION['qb'];
    $go = '/?admin=css&';
    if ($d == "herit") {
        $ht = "herit_";
    }
    $r = explore("msql/design/", 'files', 1);
    asort($r);
    if ($r) {
        foreach ($r as $k => $v) {
            $v = substr($v, 0, -4);
            list($nd, $bs, $nb, $sv) = split("_", $v);
            if ($sv != "sav" && $nd && is_numeric($nb) && ($nd == $qb or $d == "herit" && ($nd == "public" or $_SESSION['auth'] > 6))) {
                $rb[$nd][$nb][$bs] = $nb;
            }
        }
        $tab[] = array('hub', 'design', 'clrset');
        if ($rb) {
            foreach ($rb as $k => $v) {
                if (is_array($v)) {
                    $taba = '';
                    $tabb = '';
                    foreach ($v as $nb => $bs) {
                        $ra = msql_read('users', $k . '_design', '');
                        $na = $ra[$nb][0] ? $ra[$nb][0] : $bs["design"];
                        if ($d == "herit") {
                            $nd = $k . '_';
                        } else {
                            $nd = '';
                        }
                        $tabt[$nb] = $nb;
                        if ($bs["design"]) {
                            $taba[$nb] = lkc("txtbox", $go . $ht . 'desgn=' . $nd . $bs["design"], $na);
                        }
                        if ($bs["clrset"]) {
                            $tabb[$nb] = lkc("txtbox", $go . $ht . 'clrset=' . $nd . $bs["clrset"], clrset_view($k . '_clrset_' . $bs["clrset"]));
                        }
                    }
                    if ($taba) {
                        $nbd = count($taba);
                    }
                    if ($tabb) {
                        $nbc = count($tabb);
                    }
                    if ($d == "select") {
                        $add = lkc("txtbox", $go . 'desgn=' . ($nbd + 1) . '&add_design==', "add_design");
                        $adc = lkc("txtbox", $go . 'clrset=' . ($nbc + 1) . '&add_clrset==', "add_colorset");
                    }
                    $tab[] = array(btn('txtcadr', $k), $add, $adc);
                    $nb = count($taba);
                    for ($i = 0; $i <= $nb; $i++) {
                        $tab[] = array($tabt[$i], $taba[$i], $tabb[$i]);
                    }
                }
            }
        }
    }
    return scroll_b($tab, make_table($tab), 20, 320, 320);
}
示例#19
0
文件: finder.php 项目: philum/cms
function fi_slct($p, $rb)
{
    if ($rb[3] == 'icon') {
        $_SESSION['droot'] = $jc = 'imgb/icons/';
    } else {
        $jc = 'users/';
    }
    if (!$_SESSION['curdir']) {
        shared_files();
    }
    // or $_GET['admin']=='finder'
    if ($rb[4] == 'recursive') {
        $r = explore('users/' . $p, 'dirs');
    } elseif ($rb[0] == 'disk') {
        $r = explore($jc . $p, '');
    } elseif ($rb[0] == 'flap') {
        $r = explore($jc . $p, '');
    } else {
        $r = finder_shared($p, $rb);
        $rb[0] = 'shared';
    }
    if (is_array($r)) {
        natsort($r);
    }
    //p($r);
    return array($r, $rb);
}
示例#20
0
文件: bubs.php 项目: philum/cms
function bub_admsq_lang_sub()
{
    $r = explore('msql/lang', 'dirs', '1');
    list($b, $d, $p, $t, $ver, $def) = $_SESSION['murl'];
    if ($p) {
        $lk = '/' . $p;
    }
    if ($t) {
        $lk .= '_' . $t;
    }
    if ($ver) {
        $lk = '_' . $ver;
    }
    foreach ($r as $k => $v) {
        $ret[] = array($v, 'link', '', '/msql/lang/' . $v . $lk, 'admsq', '', 'lang', 'msql');
    }
    return $ret;
}
示例#21
0
function explore_json($json_string, $_options = array())
{
    $json_data = json_decode($json_string);
    if (!isset($_options['title'])) {
        $_options['title'] = 'Exploring JSON string';
    }
    return explore($json_data, $_options);
}
示例#22
0
<?php

require_once "../../main.php";
explore($_COOKIE);
示例#23
0
function display_sub_dirs($current_dir, $sub_dirs)
{
    $results = explore($current_dir, $sub_dirs, 1);
    foreach ($results as $r) {
        echo '<tr id = "row" data-file="' . $r[0] . '" data-type="dir">
				<td class = "filename svg" width = "14%">
					<a class = "dirs" id = "' . $r[0] . '" href = "' . OCP\Util::linkTo('reader', 'index.php') . '&dir=' . $current_dir . $r[0] . '/' . '">';
        // Check if sub-directory($r[0]) exists or not-->
        $is_dir = check_dir_exists($current_dir, $r[0]);
        if ($is_dir == false) {
            echo '<img src= "' . OCP\image_path('reader', 'download.jpg') . '" style = "width:100px; height:100px;">';
        } else {
            $margin = 15;
            $img_id = 1;
            foreach ($r[1] as $thumbs) {
                $thumb_exists = false;
                $thumb_exists = check_thumb_exists($current_dir . $r[0] . '/' . $thumbs);
                if ($thumb_exists != 'true') {
                    $img_path = "/owncloud/apps/reader/img/images.jpg";
                    echo '<div style =';
                    echo 'background-image:url("';
                    echo OCP\image_path('reader', 'images.jpg');
                    echo '");width:100px;height:100px;';
                    echo "></div>";
                } else {
                    if ($thumb_exists == 'true') {
                        $img_path = \OCP\Util::linkTo('reader', 'ajax/thumbnail.php') . '&filepath=' . urlencode($current_dir . $r[0] . '/' . rtrim($thumbs, 'pdf') . 'png');
                        $counter = 3;
                    }
                }
                if ($thumb_exists != 'false') {
                    for ($i = 1; $i <= $counter; $i++) {
                        echo '<img id = "img' . $img_id . '" src = "' . $img_path . '" style = "position:absolute; top:20px; left:10px; margin-left:' . $margin . 'px; z-index:' . (50 - $margin) . ';">';
                        $margin = $margin + 5;
                        $img_id = $img_id + 1;
                    }
                }
            }
        }
        echo '</a>
					</td>
					<td id = "info" width = "86%">
						<span class = "nametext">';
        echo htmlspecialchars($r[0]);
        echo '</span>
				  <div id = "more_info" style = "color:#666;margin-left:5px;margin-top:15px;">';
        echo "Browse in for";
        echo '<br>';
        $dir_browse_results = explore($current_dir, array($r[0]), 5);
        foreach ($dir_browse_results as $browse_result) {
            foreach ($browse_result[1] as $each) {
                $each_sub_dir = explode("/", $each);
                if (count($each_sub_dir) > 1) {
                    foreach ($each_sub_dir as $element) {
                        echo '<span style = "color:#DDD;">>></span>' . $element;
                    }
                } else {
                    echo '<span style = "color:#DDD;"> >></span>' . $each;
                }
                echo '<br>';
            }
        }
        echo '</div> </td> </tr>';
    }
}
示例#24
0
function tardir_r($d)
{
    $r = explore('' . $d . '/', 'dirs');
    if ($r) {
        foreach ($r as $k => $v) {
            if (substr($k, 0, 1) != '_' && !is_numeric($v)) {
                $rf = '';
                //$lk='_public/'.$d.'/'.$k.'.tar.gz'; $f=''.$d.'/'.$k; PclTarCreate($lk,$f);
                tardir($d . '/' . $k);
            }
        }
    }
}
示例#25
0
		</textarea>
	</fieldset>
	<input type="submit" value="Execute" class="amit_button"/>
	</form>
</body>
</html>
<?php 
    $code = stripslashes($_POST["code"]);
    $lang = $_POST["PL"];
    //explore($client->getLanguages($user="******",$pass="******"));
    if ($code) {
        $result = $client->createSubmission($user = USER, $pass = PWD, $sourceCode = $code, $language = $lang, $input = "", $run = 1, $private = 0);
        //explore($result);
        $stat = $client->getSubmissionStatus($user = USER, $pass = PWD, $link = $result["link"]);
        //explore($stat);
        $output = $client->getSubmissionDetails($user = USER, $pass = PWD, $link = $result["link"], $withSource = 1, $withInput = 0, $withOutput = 1, $withStderr = 1, $withCmpinfo = 1);
        echo $output["output"];
        explore($output);
        //echo $output["output"];
    }
    ?>
 
    </div>
  </div>
</div>
<?php 
} else {
    // if profiles are not enabled in web.config
    require_once ROOT_PATH . 'user/modules/accordion/error_messages.php';
    echo $profiles_not_enabled;
}
示例#26
0
文件: codeview.php 项目: philum/cms
function savefunc_plug()
{
    //save_all
    $r = explore('plug', 'full', 1);
    //pr($r);
    $ra = array('edit', 'dev', 'admin', 'ummo', 'photo');
    //$ra=explore('plug','dirs',1);
    if ($ra) {
        foreach ($ra as $v) {
            $rb = explore('plug/' . $v, 'full');
            //if($rb)foreach($rb as $vb)$r[]=$vb;
        }
    }
    foreach ($r as $v) {
        if ($v != 'userdl.tar.gz') {
            $p = strrchr_b($v, '/');
            $p = strdeb($p, '.');
            save_funcs($v, $p);
        }
    }
}
示例#27
0
文件: dsnav.php 项目: philum/cms
function plug_dsnav($c, $dir)
{
    $_SESSION["nbsd"] = 0;
    if (is_numeric($dir)) {
        $_SESSION["ds"] = $dir;
        $dir = 'bkg';
    }
    if (!$dir) {
        $dir = 'users/' . $_SESSION['qb'];
    }
    if ($c == 'ds' or $c == 'gl' or $c == 'dl' or $c == 'ic') {
        $_SESSION["ds"] = $c;
    }
    if ($c == "ic") {
        $dir = 'imgb/icons';
    }
    $r = explore($dir);
    $ret = make_topo($r, $dir, $c);
    if ($_SESSION["nbsd"] > 15) {
        $ret = divd("scroll", $ret);
    }
    return $ret;
}
示例#28
0
header('Content-Type: application/json');
error_reporting(E_ALL);
include "simple_html_dom.php";
include "utils.php";
//check if "query" parameter exist and it isn't null
if (isset($_GET['query']) && $_GET['query'] != null) {
    // query parameter exists
    $query = $_GET['query'];
    switch ($query) {
        case "find":
            find();
            // "find" function is in utils.php
            break;
        case "explore":
            explore("https://www.mashape.com/explore");
            // "explore" function is in utils.php
            break;
        case "list":
            list_of_tags("https://www.mashape.com/explore");
            // "list_of_tags" function is in utils.php
            break;
        default:
            error("Query null");
    }
} else {
    error("Query null");
}
function error($message)
{
    $data = array('Error' => $message);
示例#29
0
文件: slider.php 项目: philum/cms
function slider_build($dir, $id, $opt)
{
    //$dir.'+'.$id.'+'.$opt;
    $hub = $_SESSION["qb"] . '_';
    //$ret.=divd('popslide','');
    if ($id == 'base') {
        $nod = $dir;
    } elseif (!$dir && $id) {
        $r = sql('img', 'qda', 'v', 'id="' . $id . '"');
        $re = explode("/", $r);
        $predir = 'img/';
        $nod = $hub . $id;
    } elseif ($id == 'manual') {
        // or (strpos($dir,'manual')!==false && $opt=='rebuild')
        $predir = 'img/';
        $nod = $hub . $_SESSION['read'] . 'manual';
        $re = explode(",", str_replace("\n", "", $dir));
        $opt = 'rebuild';
    } elseif (strpos($dir, "/") !== false) {
        $predir = 'users/' . $dir . '/';
        $re = explore($predir);
        $nod = $hub . str_replace("/", "", str_replace($_SESSION["qb"], "", $dir));
    } else {
        $nod = $dir;
        $edit = 'ok';
        list($hb, $nd) = split('_', $dir);
        if (is_numeric($nd)) {
            $dir = $dir;
        } elseif (strpos($nd, 'manual') !== false) {
            $edit = 'ok';
        } else {
            $rb = msql_read('gallery', $nod, '');
            list($prd, $fil) = split_right('/', $rb[1][2], 1);
            $predir = $prd . '/';
            $dir = str_replace("users/", "", $prd);
            $re = explore($predir);
        }
    }
    $dor = ajx($dir, '');
    $ret .= lj('popbt', 'popup_gallery', '<-') . ' ';
    $ret .= lj('popbt', 'popup_slider__x_' . $dor . '_' . $id, picto('reload')) . ' ';
    if ($edit) {
        $ret .= lj('popsav', 'popup_slider__3x_' . $dor . '_' . $id . '_rebuild', "Rebuild") . ' ';
    }
    list($base, $table) = split('_', $nod);
    if ($edit) {
        $ret .= msqlink('gallery', $base . '_' . $table) . br();
    } else {
        $ret .= ljb("popbt", "insert_photo", $nod . '\',\'slider', "Slider (Flash)") . ' ';
        $ret .= ljb("popbt", "insert_photo", $nod . '\',\'sliderJ', "SliderJ (Ajax)") . ' ';
        $ret .= ljb("popbt", "insert_photo", $nod . '§1\',\'sliderJ', "SliderJ+thumbs") . br();
    }
    $ret .= br();
    $dirg = 'msql/gallery/';
    if (!is_dir($dirg)) {
        mkdir($dirg);
    }
    $file = 'msql/gallery/' . $nod . '.php';
    if ($re && (!is_file($file) or $opt == 'rebuild')) {
        $r = slider_builder($re, $predir, $nod);
    } else {
        $r = msql_read('gallery', $nod, '');
    }
    $nodb = str_replace('_', '*', $nod);
    if ($r['_menus_']) {
        unset($r['_menus_']);
    }
    if ($r) {
        foreach ($r as $k => $v) {
            $img = image('gallery/mini/' . $v[1], '', '');
            $rj = array('edit' . $k, 'plug', '', '', 'slider', 'slider*edit', $nodb, $k, '');
            $imgnma = str_replace('*', '_', $v[0]);
            $imgnm = jimg($v[2], $img) . br();
            $imgnm .= call_func('popbt', $rj, $imgnma);
            $datas[$imgnm] = array(divd('edit' . $k, $v[7]));
        }
    }
    $ret .= make_tables('', $datas, 'txtred', 'txtblc" style="padding:4px;');
    return popup($nod, $ret);
}
示例#30
0
文件: index.php 项目: philum/cms
function plug_index()
{
    $ico = picto('editxt');
    $dir = 'plug/';
    $plug = msql_read('system', 'program_plugs', '');
    $help = msql_read('lang', 'program_plugs', '');
    $mt = msql_read_prep('system', 'program_plugs_types');
    $re = explore($dir, 'files', 1);
    sort($re);
    $rt = array('url', 'plugin', 'open', 'edit', 'do', 'usage', 'tag', 'private', 'interface', 'dev', 'old', 'modified');
    foreach ($re as $k => $v) {
        $va = substr($v, 0, -4);
        $plg = $plug[$va];
        if (auth(4)) {
            $fi = lj('', 'popup_editmsql___system/program*plugs_' . ajx($va) . '__1', $ico) . ' ';
        }
        if (auth(4)) {
            $hlp = lj('', 'popup_editmsql___lang/fr/program*plugs_' . ajx($va) . '__1', $ico) . ' ';
        }
        $do = $help[$va][0];
        if ($do) {
            $dobt = lj('', 'popup_popmsq___lang_program*plugs_' . ajx($va) . '_usage', picto('view'));
        } else {
            $dobt = '';
        }
        $edt = lj('', 'popup_plupin__3_codev_plug_' . $va, picto('conn'));
        $mkc = '-';
        $pb = $plg[3] ? $plg[3] : '-';
        if ($plg[2] == 1) {
            $op = lj('', 'popup_plupin__3_' . $va, picto('get'));
        } else {
            $op = '';
        }
        $lk = lkt('txtx', '/plugin/' . $va, picto('link'));
        $tim = filemtime($dir . $v);
        $dat = date($d ? $d : 'ymd', $tim);
        if (substr($v, 0, 1) != '_' && substr($v, -4) == '.php' && $va) {
            $ra['all'][] = $rv;
            $ssh = $plg[4];
            $dev = $plg[5];
            $rv = array($lk, $fi . $va, $op, $edt, $hlp . $dobt, $plg[0], $plg[1], $pb, $ssh, $dev, $plg[6], $dat);
            if (strpos($plg[1], ' ')) {
                $kr = explode(' ', $plg[1]);
                for ($i = 0; $i < count($kr); $i++) {
                    $ra[$kr[$i]][] = $rv;
                }
            } elseif ($plg[1]) {
                $ra[$plg[1]][] = $rv;
            } else {
                $ra['new'][] = $rv;
            }
        }
    }
    foreach ($ra as $k => $v) {
        $rd = array_merge(array($rt), $v);
        if ($k == 'all') {
            $rb[$k] .= msqlink('system', 'program_plugs');
        } elseif ($mt[$k]) {
            $rb[$k] .= divc('', current($mt[$k])) . br();
        }
        $rb[$k] .= make_table($rd, 'txtcadr', '');
    }
    return make_tabs($rb);
}