Ejemplo n.º 1
0
Archivo: pray.php Proyecto: philum/cms
function pray_build($p, $o, $r = '')
{
    //uid,day,act
    //$r=db_read('ummo/pray/1511');
    if (!$r) {
        $r = msql_read('', 'ummo_pray_1', '', '1');
    }
    //p($r);
    if ($r) {
        foreach ($r as $k => $v) {
            if ($k != '_menus_') {
                $ra[$v[0]][$v[1]] = $v[2] ? 1 : 0;
            }
        }
    }
    $rt = array('user/day', 1, 2, 3, 4, 5, 6, 7);
    //headers
    if ($ra) {
        foreach ($ra as $k => $v) {
            $ra[$k] = pray_arr_fill($v);
        }
    }
    //fill empties
    if ($ra) {
        foreach ($ra as $k => $v) {
            foreach ($v as $ka => $va) {
                $rb[$k][$ka] = pray_clic($k, $ka, $va);
            }
        }
    }
    $ret = make_tables($rt, $rb, 'txtblc', '', 1);
    return $ret;
}
Ejemplo n.º 2
0
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);
}
Ejemplo n.º 3
0
Archivo: edf.php Proyecto: philum/cms
function plug_edf()
{
    req('spe');
    $r = msql_read('', $_SESSION['qb'] . '_edf', '');
    unset($r['_menus_']);
    $n = count($r);
    for ($i = 1; $i <= $n; $i++) {
        list($day, $month, $year) = split('/', $r[$i][0]);
        $dat = mktime(0, 0, 0, $month, $day, $year);
        $ra[$i] = $dat / 86400;
        if ($i == 1) {
            $dorigin = $dat;
            $vorigin = $r[$i][1];
        }
        $day = ($dat - $dorigin) / 86400;
        if ($ra[$i - 1]) {
            $diffday = $ra[$i] - $ra[$i - 1];
        }
        if ($r[$i - 1][1]) {
            $diffval = $r[$i][1] - $r[$i - 1][1];
        }
        if ($diffday) {
            $val = round($diffval / $diffday, 2);
        }
        $re[] = array($r[$i][0], $r[$i][1], round($diffday), $diffval, $val);
        //,$diffval*0.08
        $rb[$day] = $val;
        $rc[$day] = $r[$i][0];
    }
    for ($i = 1; $i <= $day; $i++) {
        if ($rb[$i]) {
            $key = $rc[$i];
        } else {
            $key = $i;
        }
        $rd[$key] = $rb[$i];
    }
    $ret = $day . ' days = ' . $val . ' units => ' . round($val / $day, 2) . ' unit/day ' . br();
    $f = 'plug/_data/edf_graph.png';
    graphics($f, $_SESSION['prma']['content'], 300, $rd, '000000', 'yes');
    $ret .= image($f, '', '');
    $rt = array('', 'date', 'count', 'days', 'units', 'average');
    //,'price'
    $ret .= make_tables($rt, $re, 'txtred', 'txtblc');
    return $ret;
}
Ejemplo n.º 4
0
function list_dir($dir)
{
    // list directory contents
    global $dir_up, $mosConfig_live_site, $_VERSION;
    $allow = ($GLOBALS["permissions"] & 01) == 01;
    $admin = ($GLOBALS["permissions"] & 04) == 04 || ($GLOBALS["permissions"] & 02) == 02;
    $dir_up = dirname($dir);
    if ($dir_up == ".") {
        $dir_up = "";
    }
    if (!get_show_item($dir_up, basename($dir))) {
        ext_Result::sendResult('', false, $dir . " : " . $GLOBALS["error_msg"]["accessdir"]);
    }
    // make file & dir tables, & get total filesize & number of items
    make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
    $dirs = explode("/", $dir);
    $implode = "";
    $dir_links = "<a href=\"" . make_link("list", "", null) . "\">..</a>&nbsp;/&nbsp;";
    foreach ($dirs as $directory) {
        if ($directory != "") {
            $implode .= $directory . "/";
            $dir_links .= "<a href=\"" . make_link("list", $implode, null) . "\">{$directory}</a>&nbsp;/&nbsp;";
        }
    }
    echo '<div class="componentheading">' . $GLOBALS["messages"]["actdir"] . ": " . $dir_links . '</div>';
    // Sorting of items
    $images = "&nbsp;<img width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\" src=\"" . _EXT_URL . "/images/";
    if ($GLOBALS["direction"] == "ASC") {
        $_srt = "DESC";
        $images .= "_arrowup.gif\" alt=\"^\">";
    } else {
        $_srt = "ASC";
        $images .= "_arrowdown.gif\" alt=\"v\">";
    }
    // Toolbar
    /*echo "<br><table width=\"95%\"><tr><td><table><tr>\n";
    	
    	// PARENT DIR
    	echo "<td>";
    	if( $dir != "" ) {
    	  echo "<a href=\"".make_link("list",$dir_up,NULL)."\">";
    	  echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_up.png\" ";
    	  echo "alt=\"".$GLOBALS["messages"]["uplink"]."\" title=\"".$GLOBALS["messages"]["uplink"]."\"></a>";
    	}
    	echo "</td>\n";
    	// HOME DIR
    	echo "<td><a href=\"".make_link("list",NULL,NULL)."\">";
    	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_home.gif\" ";
    	echo "alt=\"".$GLOBALS["messages"]["homelink"]."\" title=\"".$GLOBALS["messages"]["homelink"]."\"></a></td>\n";
    	// RELOAD
    	echo "<td><a href=\"javascript:location.reload();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    	echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_refresh.gif\" alt=\"".$GLOBALS["messages"]["reloadlink"];
    	echo "\" title=\"".$GLOBALS["messages"]["reloadlink"]."\"></A></td>\n";
    	// SEARCH
    	echo "<td><a href=\"".make_link("search",$dir,NULL)."\">";
    	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/_search.gif\" ";
    	echo "alt=\"".$GLOBALS["messages"]["searchlink"]."\" title=\"".$GLOBALS["messages"]["searchlink"];
    	echo "\"></a></td>\n";
    	
    	echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>";
    	
    	// Joomla Sysinfo
    	echo "<td><a href=\"".make_link("sysinfo",$dir,NULL)."\">";
    	echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\""._EXT_URL."/images/systeminfo.gif\" ";
    	echo "alt=\"" . $GLOBALS['messages']['mossysinfolink'] . "\" title=\"" .$GLOBALS['messages']['mossysinfolink'] . "\"></a></td>\n";
    	
    	echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>";
    	
    	if($allow) {
    		// COPY
    		echo "<td><a href=\"javascript:Copy();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_copy.gif\" alt=\"".$GLOBALS["messages"]["copylink"];
    		echo "\" title=\"".$GLOBALS["messages"]["copylink"]."\"></a></td>\n";
    		// MOVE
    		echo "<td><a href=\"javascript:Move();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_move.gif\" alt=\"".$GLOBALS["messages"]["movelink"];
    		echo "\" title=\"".$GLOBALS["messages"]["movelink"]."\"></A></td>\n";
    		// DELETE
    		echo "<td><a href=\"javascript:Delete();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_delete.gif\" alt=\"".$GLOBALS["messages"]["dellink"];
    		echo "\" title=\"".$GLOBALS["messages"]["dellink"]."\"></A></td>\n";
    		// CHMOD
    		echo "<td><a href=\"javascript:Chmod();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    		echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_chmod.gif\" alt=\"chmod\" title=\"" . $GLOBALS['messages']['chmodlink'] . "\"></a></td>\n";
    		// UPLOAD
    		if(ini_get("file_uploads")) {
    			echo "<td><a href=\"".make_link("upload",$dir,NULL)."\">";
    			echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    			echo "src=\""._EXT_URL."/images/_upload.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
    			echo "\" title=\"".$GLOBALS["messages"]["uploadlink"]."\"></A></td>\n";
    		} else {
    			echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    			echo "src=\""._EXT_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uploadlink"];
    			echo "\" title=\"".$GLOBALS["messages"]["uploadlink"]."\"></td>\n";
    		}
    		// ARCHIVE
    		if($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) {
    			echo "<td><a href=\"javascript:Archive();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    			echo "align=\"absmiddle\" src=\""._EXT_URL."/images/_archive.gif\" alt=\"".$GLOBALS["messages"]["comprlink"];
    			echo "\" title=\"".$GLOBALS["messages"]["comprlink"]."\"></A></td>\n";
    		}
    	} else {
    		// COPY
    		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    		echo "src=\""._EXT_URL."/images/_copy_.gif\" alt=\"".$GLOBALS["messages"]["copylink"]."\" title=\"";
    		echo $GLOBALS["messages"]["copylink"]."\"></td>\n";
    		// MOVE
    		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    		echo "src=\""._EXT_URL."/images/_move_.gif\" alt=\"".$GLOBALS["messages"]["movelink"]."\" title=\"";
    		echo $GLOBALS["messages"]["movelink"]."\"></td>\n";
    		// DELETE
    		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    		echo "src=\""._EXT_URL."/images/_delete_.gif\" alt=\"".$GLOBALS["messages"]["dellink"]."\" title=\"";
    		echo $GLOBALS["messages"]["dellink"]."\"></td>\n";
    		// UPLOAD
    		echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    		echo "src=\""._EXT_URL."/images/_upload_.gif\" alt=\"".$GLOBALS["messages"]["uplink"];
    		echo "\" title=\"".$GLOBALS["messages"]["uplink"]."\"></td>\n";
    	}
    
    	// ADMIN & LOGOUT
    	if($GLOBALS["require_login"]) {
    		echo "<td>::</td>";
    		// ADMIN
    		if($admin) {
    			echo "<td><a href=\"".make_link("admin",$dir,NULL)."\">";
    			echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    			echo "src=\""._EXT_URL."/images/_admin.gif\" alt=\"".$GLOBALS["messages"]["adminlink"]."\" title=\"";
    			echo $GLOBALS["messages"]["adminlink"]."\"></A></td>\n";
    		}
    		// LOGOUT
    		echo "<td><a href=\"".make_link("logout",NULL,NULL)."\">";
    		echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
    		echo "src=\""._EXT_URL."/images/_logout.gif\" alt=\"".$GLOBALS["messages"]["logoutlink"]."\" title=\"";
    		echo $GLOBALS["messages"]["logoutlink"]."\"></a></td>\n";
    	}
    	// Logo
    	echo "<td style=\"padding-left:10px;\">";
    	//echo "<div style=\"margin-left:10px;float:right;\" width=\"305\" >";
    	echo "<a href=\"".$GLOBALS['ext_home']."\" target=\"_blank\" title=\"joomlaXplorer Project\"><img border=\"0\" align=\"absmiddle\" id=\"ext_logo\" style=\"filter:alpha(opacity=10);-moz-opacity:.10;opacity:.10;\" onmouseover=\"opacity('ext_logo', 60, 99, 500);\" onmouseout=\"opacity('ext_logo', 100, 60, 500);\" ";
    	echo "src=\""._EXT_URL."/images/logo.gif\" align=\"right\" alt=\"" . $GLOBALS['messages']['logolink'] . "\"></a>";
    	//echo "</div>";
    	echo "</td>\n";
    	
    	echo "</tr></table></td>\n";
    	
    	// Create File / Dir
    	
    	if($allow && is_writable($GLOBALS['home_dir'].'/'.$dir)) {
    		echo "<td align=\"right\"><table><form action=\"".make_link("mkitem",$dir,NULL)."\" method=\"post\">\n<tr><td>";
    		echo "<select name=\"mktype\"><option value=\"file\">".$GLOBALS["mimes"]["file"]."</option>";
    		echo "<option value=\"dir\">".$GLOBALS["mimes"]["dir"]."</option></select>\n";
    		echo "<input name=\"mkname\" type=\"text\" size=\"15\">";
    		echo "<input type=\"submit\" value=\"".$GLOBALS["messages"]["btncreate"];
    		echo "\"></td></tr></form></table></td>\n";
    	}
    	
    	echo "</tr></table>\n";
    	*/
    // End Toolbar
    // Begin Table + Form for checkboxes
    echo "<table width=\"95%\" cellpadding=\"5\" cellspacing=\"2\"><tr class=\"sectiontableheader\">\n";
    echo "<th width=\"44%\"><b>\n";
    if ($GLOBALS["order"] == "name") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"];
    if ($GLOBALS["order"] == "name") {
        echo $images;
    }
    echo "</a></b></td>\n<th width=\"10%\"><b>";
    if ($GLOBALS["order"] == "size") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"];
    if ($GLOBALS["order"] == "size") {
        echo $images;
    }
    echo "</a></b></th>\n<th width=\"12%\" ><b>";
    if ($GLOBALS["order"] == "type") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"];
    if ($GLOBALS["order"] == "type") {
        echo $images;
    }
    echo "</a></b></th>\n<th width=\"12%\"><b>";
    if ($GLOBALS["order"] == "mod") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"];
    if ($GLOBALS["order"] == "mod") {
        echo $images;
    }
    echo "</a></b></th></tr>\n";
    // make & print Table using lists
    print_table($dir, make_list($dir_list, $file_list), $allow);
    // print number of items & total filesize
    echo "<tr><td colspan=\"4\"><hr/></td></tr><tr>\n<td>&nbsp;</td>";
    echo "<td>" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " " . parse_file_size($tot_file_size) . "</td>\n";
    echo "<td>&nbsp;</td><td>&nbsp;</td>";
    echo "</tr>\n<tr><td colspan=\"4\"><hr/></td></tr></table>\n";
}
Ejemplo n.º 5
0
Archivo: troc.php Proyecto: philum/cms
function troc_read_table($r, $rid, $ob, $picto)
{
    $rh = array('id', 'Utilisateur', 'Désignation', 'Type de transaction', 'Description', 'Etat');
    if ($r) {
        foreach ($r as $k => $v) {
            $usr = divc('', lj('popbt', $rid . '_plug___troc_troc*profil_' . $v[1] . '_' . $rid . '-offers', pictxt('user', $v[1])));
            $bt = lj('popbt', $rid . '_plug___troc_troc*read*obj_' . $v[0] . '_' . $rid . '-offers', pictxt('view', $v[2]));
            $rt[] = array($v[0], $usr, $bt, $v[3], $v[4], offon($v[5]));
        }
    }
    return make_tables($rh, $rt, 'txtx', 'txtblc');
}
Ejemplo n.º 6
0
function list_dir($dir)
{
    // list directory contents
    global $dir_up, $mosConfig_live_site, $_VERSION;
    ?>
	<script type="text/javascript" src="<?php 
    echo $mosConfig_live_site;
    ?>
/includes/js/overlib_mini.js"></script>
	<div id="overDiv" style="position:absolute; visibility:hidden; z-index:10000;"></div>
	<?php 
    $allow = ($GLOBALS["permissions"] & 01) == 01;
    $admin = ($GLOBALS["permissions"] & 04) == 04 || ($GLOBALS["permissions"] & 02) == 02;
    $dir_up = dirname($dir);
    if ($dir_up == ".") {
        $dir_up = "";
    }
    if (!get_show_item($dir_up, basename($dir))) {
        show_error($dir . " : " . $GLOBALS["error_msg"]["accessdir"]);
    }
    // make file & dir tables, & get total filesize & number of items
    make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
    $dirs = explode("/", $dir);
    $implode = "";
    $dir_links = "<a href=\"" . make_link("list", "", null) . "\">..</a>/";
    foreach ($dirs as $directory) {
        if ($directory != "") {
            $implode .= $directory . "/";
            $dir_links .= "<a href=\"" . make_link("list", $implode, null) . "\">{$directory}</a>/";
        }
    }
    show_header($GLOBALS["messages"]["actdir"] . ": " . $dir_links);
    // Javascript functions:
    include _QUIXPLORER_PATH . "/include/javascript.php";
    // Sorting of items
    $images = "&nbsp;<img width=\"10\" height=\"10\" border=\"0\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/";
    if ($GLOBALS["srt"] == "yes") {
        $_srt = "no";
        $images .= "_arrowup.gif\" alt=\"^\">";
    } else {
        $_srt = "yes";
        $images .= "_arrowdown.gif\" alt=\"v\">";
    }
    // Toolbar
    echo "<br><table width=\"95%\"><tr><td><table><tr>\n";
    // PARENT DIR
    echo "<td>";
    if ($dir != "") {
        echo "<a href=\"" . make_link("list", $dir_up, NULL) . "\">";
        echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_up.png\" ";
        echo "alt=\"" . $GLOBALS["messages"]["uplink"] . "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"></a>";
    }
    echo "</td>\n";
    // HOME DIR
    echo "<td><a href=\"" . make_link("list", NULL, NULL) . "\">";
    echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_home.gif\" ";
    echo "alt=\"" . $GLOBALS["messages"]["homelink"] . "\" title=\"" . $GLOBALS["messages"]["homelink"] . "\"></a></td>\n";
    // RELOAD
    echo "<td><a href=\"javascript:location.reload();\"><img border=\"0\" width=\"22\" height=\"22\" ";
    echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_refresh.gif\" alt=\"" . $GLOBALS["messages"]["reloadlink"];
    echo "\" title=\"" . $GLOBALS["messages"]["reloadlink"] . "\"></A></td>\n";
    // SEARCH
    if (!jx_isFTPMode()) {
        echo "<td><a href=\"" . make_link("search", $dir, NULL) . "\">";
        echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_search.gif\" ";
        echo "alt=\"" . $GLOBALS["messages"]["searchlink"] . "\" title=\"" . $GLOBALS["messages"]["searchlink"];
        echo "\"></a></td>\n";
    }
    echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>";
    // Joomla Sysinfo
    echo "<td><a href=\"" . make_link("sysinfo", $dir, NULL) . "\">";
    echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/systeminfo.gif\" ";
    echo "alt=\"" . $GLOBALS['messages']['mossysinfolink'] . "\" title=\"" . $GLOBALS['messages']['mossysinfolink'] . "\"></a></td>\n";
    echo "<td><img src=\"images/menu_divider.png\" height=\"22\" width=\"2\" border=\"0\" alt=\"|\" /></td>";
    if ($allow) {
        // COPY
        echo "<td><a href=\"javascript:Copy();\"><img border=\"0\" width=\"22\" height=\"22\" ";
        echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_copy.gif\" alt=\"" . $GLOBALS["messages"]["copylink"];
        echo "\" title=\"" . $GLOBALS["messages"]["copylink"] . "\"></a></td>\n";
        // MOVE
        echo "<td><a href=\"javascript:Move();\"><img border=\"0\" width=\"22\" height=\"22\" ";
        echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_move.gif\" alt=\"" . $GLOBALS["messages"]["movelink"];
        echo "\" title=\"" . $GLOBALS["messages"]["movelink"] . "\"></A></td>\n";
        // DELETE
        echo "<td><a href=\"javascript:Delete();\"><img border=\"0\" width=\"22\" height=\"22\" ";
        echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_delete.gif\" alt=\"" . $GLOBALS["messages"]["dellink"];
        echo "\" title=\"" . $GLOBALS["messages"]["dellink"] . "\"></A></td>\n";
        // CHMOD
        echo "<td><a href=\"javascript:Chmod();\"><img border=\"0\" width=\"22\" height=\"22\" ";
        echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_chmod.gif\" alt=\"chmod\" title=\"" . $GLOBALS['messages']['chmodlink'] . "\"></a></td>\n";
        // UPLOAD
        if (ini_get("file_uploads")) {
            echo "<td><a href=\"" . make_link("upload", $dir, NULL) . "\">";
            echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
            echo "src=\"" . _QUIXPLORER_URL . "/images/_upload.gif\" alt=\"" . $GLOBALS["messages"]["uploadlink"];
            echo "\" title=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></A></td>\n";
        } else {
            echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
            echo "src=\"" . _QUIXPLORER_URL . "/images/_upload_.gif\" alt=\"" . $GLOBALS["messages"]["uploadlink"];
            echo "\" title=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></td>\n";
        }
        // ARCHIVE
        if (($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) && !jx_isFTPMode()) {
            echo "<td><a href=\"javascript:Archive();\"><img border=\"0\" width=\"22\" height=\"22\" ";
            echo "align=\"absmiddle\" src=\"" . _QUIXPLORER_URL . "/images/_archive.gif\" alt=\"" . $GLOBALS["messages"]["comprlink"];
            echo "\" title=\"" . $GLOBALS["messages"]["comprlink"] . "\"></a></td>\n";
        }
    } else {
        // COPY
        echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
        echo "src=\"" . _QUIXPLORER_URL . "/images/_copy_.gif\" alt=\"" . $GLOBALS["messages"]["copylink"] . "\" title=\"";
        echo $GLOBALS["messages"]["copylink"] . "\"></td>\n";
        // MOVE
        echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
        echo "src=\"" . _QUIXPLORER_URL . "/images/_move_.gif\" alt=\"" . $GLOBALS["messages"]["movelink"] . "\" title=\"";
        echo $GLOBALS["messages"]["movelink"] . "\"></td>\n";
        // DELETE
        echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
        echo "src=\"" . _QUIXPLORER_URL . "/images/_delete_.gif\" alt=\"" . $GLOBALS["messages"]["dellink"] . "\" title=\"";
        echo $GLOBALS["messages"]["dellink"] . "\"></td>\n";
        // UPLOAD
        echo "<td><img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
        echo "src=\"" . _QUIXPLORER_URL . "/images/_upload_.gif\" alt=\"" . $GLOBALS["messages"]["uplink"];
        echo "\" title=\"" . $GLOBALS["messages"]["uplink"] . "\"></td>\n";
    }
    // ADMIN & LOGOUT
    if ($GLOBALS["require_login"]) {
        echo "<td>::</td>";
        // ADMIN
        if ($admin) {
            echo "<td><a href=\"" . make_link("admin", $dir, NULL) . "\">";
            echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
            echo "src=\"" . _QUIXPLORER_URL . "/images/_admin.gif\" alt=\"" . $GLOBALS["messages"]["adminlink"] . "\" title=\"";
            echo $GLOBALS["messages"]["adminlink"] . "\"></A></td>\n";
        }
        // LOGOUT
        echo "<td><a href=\"" . make_link("logout", NULL, NULL) . "\">";
        echo "<img border=\"0\" width=\"22\" height=\"22\" align=\"absmiddle\" ";
        echo "src=\"" . _QUIXPLORER_URL . "/images/_logout.gif\" alt=\"" . $GLOBALS["messages"]["logoutlink"] . "\" title=\"";
        echo $GLOBALS["messages"]["logoutlink"] . "\"></a></td>\n";
    }
    // Logo
    echo "<td style=\"padding-left:10px;\">";
    //echo "<div style=\"margin-left:10px;float:right;\" width=\"305\" >";
    echo "<a href=\"" . $GLOBALS['jx_home'] . "\" target=\"_blank\" title=\"joomlaXplorer Project\"><img border=\"0\" align=\"absmiddle\" id=\"jx_logo\" style=\"filter:alpha(opacity=10);-moz-opacity:.10;opacity:.10;\" onmouseover=\"opacity('jx_logo', 60, 99, 500);\" onmouseout=\"opacity('jx_logo', 100, 60, 500);\" ";
    echo "src=\"" . _QUIXPLORER_URL . "/images/logo.gif\" align=\"right\" alt=\"" . $GLOBALS['messages']['logolink'] . "\"></a>";
    //echo "</div>";
    echo "</td>\n";
    echo "</tr></table></td>\n";
    // Create File / Dir
    if ($allow && @$GLOBALS['jx_File']->is_writable(get_abs_dir($dir))) {
        echo "<td align=\"right\">\n\t\t\t\t<form action=\"" . make_link("mkitem", $dir, NULL) . "\" method=\"post\" name=\"mkitemform\">\n\n\t\t\t\t<table><tr><td>\n\t\t\t\t\t<select name=\"mktype\" onchange=\"checkMkitemForm(this.options[this.selectedIndex])\">\n\t\t\t\t\t\t<option value=\"file\">" . $GLOBALS["mimes"]["file"] . "</option>\n\t\t\t\t\t\t<option value=\"dir\">" . $GLOBALS["mimes"]["dir"] . "</option>";
        if (!jx_isFTPMode() && !$GLOBALS['isWindows']) {
            echo "\t\t\t<option value=\"symlink\">" . $GLOBALS["mimes"]["symlink"] . "</option>\n";
        }
        echo "\t\t</select>\n\t\t\t\t\t<input name=\"symlink_target\" type=\"hidden\" size=\"25\" title=\"{$GLOBALS['messages']['symlink_target']}\" value=\"{$GLOBALS['mosConfig_absolute_path']}\" />\n\t\t\t\t\t<input name=\"mkname\" type=\"text\" size=\"15\" title=\"{$GLOBALS['messages']['nameheader']}\" />\n\t\t\t\t\t<input type=\"submit\" value=\"" . $GLOBALS["messages"]["btncreate"] . "\" />\n\t\t\t\t\t</td></tr>\n\t\t\t\t\t<tr><td id=\"quick_jumpto\">" . list_bookmarks($dir) . "</td></tr>\n\t\t\t\t</table>\n\t\t\t\t<script type=\"text/javascript\">function checkMkitemForm( el ) { if( el.value =='symlink' ) document.mkitemform.symlink_target.type='text'; else document.mkitemform.symlink_target.type='hidden';} </script>\n\t\t\t\t</form>\n\t\t\t  </td>\n";
    } else {
        echo "<td align=\"right\">\n\t\t\t\t<table><tr><td id=\"quick_jumpto\">" . list_bookmarks($dir) . "</td></tr></table>\n\t\t\t </td>";
    }
    echo "</tr></table>\n";
    // End Toolbar
    // Begin Table + Form for checkboxes
    echo "<form name=\"selform\" method=\"post\" action=\"" . make_link("post", $dir, null) . "\">\n\t<input type=\"hidden\" name=\"do_action\" /><input type=\"hidden\" name=\"first\" value=\"y\" />\n\t<table class=\"adminlist\" width=\"95%\">\n";
    if (extension_loaded("posix")) {
        $owner_info = '<th width="15%" class="title">' . $GLOBALS['messages']['miscowner'] . '&nbsp;';
        if (jx_isFTPMode()) {
            $my_user_info = posix_getpwnam($_SESSION['ftp_login']);
            $my_group_info = posix_getgrgid($my_user_info['gid']);
        } else {
            $my_user_info = posix_getpwuid(posix_geteuid());
            $my_group_info = posix_getgrgid(posix_getegid());
        }
        $owner_info .= mosTooltip(mysql_escape_string(sprintf($GLOBALS['messages']['miscownerdesc'], $my_user_info['name'], $my_user_info['uid'], $my_group_info['name'], $my_group_info['gid'])));
        // new [mic]
        $owner_info .= "</th>\n";
        $colspan = 8;
    } else {
        $owner_info = "";
        $colspan = 7;
    }
    // Table Header
    echo "<tr>\n\t<th width=\"2%\" class=\"title\">\n\t\t<input type=\"checkbox\" name=\"toggleAllC\" onclick=\"javascript:ToggleAll(this);\" />\n\t</th>\n\t<th width=\"34%\" class=\"title\">\n";
    if ($GLOBALS["order"] == "name") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"];
    if ($GLOBALS["order"] == "name") {
        echo $images;
    }
    echo '</a>';
    echo "</th>\n\t<th width=\"10%\" class=\"title\">";
    if ($GLOBALS["order"] == "size") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"];
    if ($GLOBALS["order"] == "size") {
        echo $images;
    }
    echo "</a></th>\n\t<th width=\"14%\" class=\"title\">";
    if ($GLOBALS["order"] == "type") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"];
    if ($GLOBALS["order"] == "type") {
        echo $images;
    }
    echo "</a></th>\n\t<th width=\"14%\" class=\"title\">";
    if ($GLOBALS["order"] == "mod") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<a href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"];
    if ($GLOBALS["order"] == "mod") {
        echo $images;
    }
    echo "</a></th>\n\t<th width=\"2%\" class=\"title\">" . $GLOBALS["messages"]["permheader"] . "\n";
    echo "</th>";
    echo $owner_info;
    echo "<th width=\"10%\" class=\"title\">" . $GLOBALS["messages"]["actionheader"] . "</th>\n\t\n\t</tr>\n";
    // make & print Table using lists
    print_table($dir, make_list($dir_list, $file_list), $allow);
    // print number of items & total filesize
    echo "<tr><td colspan=\"{$colspan}\"><hr/></td></tr><tr>\n<td class=\"title\"></td>";
    echo "<td class=\"title\">" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " (";
    if (function_exists("disk_free_space")) {
        $size = disk_free_space($GLOBALS['home_dir'] . $GLOBALS['separator']);
        $free = parse_file_size($size);
    } elseif (function_exists("diskfreespace")) {
        $size = diskfreespace($GLOBALS['home_dir'] . $GLOBALS['separator']);
        $free = parse_file_size($size);
    } else {
        $free = "?";
    }
    echo $GLOBALS["messages"]["miscfree"] . ": " . $free . ")</td>\n";
    echo "<td class=\"title\">" . parse_file_size($tot_file_size) . "</td>\n";
    for ($i = 0; $i < $colspan - 3; ++$i) {
        echo "<td class=\"title\"></td>";
    }
    echo "</tr>\n<tr><td colspan=\"{$colspan}\"><hr/></td></tr></table>\n\t\t</form>";
    ?>
<script type="text/javascript"><!--
	// Uncheck all items (to avoid problems with new items)
	var ml = document.selform;
	var len = ml.elements.length;
	for(var i=0; i<len; ++i) {
		var e = ml.elements[i];
		if(e.name == "selitems[]" && e.checked == true) {
			e.checked=false;
		}
	}
	opacity('jx_logo', 10, 60, 2000);
// --></script>

<?php 
}
Ejemplo n.º 7
0
Archivo: pop.php Proyecto: philum/cms
function msqbin($d)
{
    $r = msq_goodtable($d);
    $ima = picto('no');
    $imb = picto('valid');
    if (is_array($r)) {
        if (is_array($r['_menus_'])) {
            $titles = $r['_menus_'];
            unset($r['_menus_']);
        }
        if ($titles) {
            array_unshift($titles, '');
        }
        foreach ($r as $k => $v) {
            if (is_array($v)) {
                foreach ($v as $ka => $va) {
                    if ($va == '0') {
                        $r[$k][$ka] = $ima;
                    } elseif ($va == 1) {
                        $r[$k][$ka] = $imb;
                    }
                }
            } else {
                if ($v == 0) {
                    $r[$k] = $ima;
                } elseif ($v == 1) {
                    $r[$k] = $imb;
                }
            }
        }
        return make_tables($titles, $r, 'txtcadr', '');
    }
}
Ejemplo n.º 8
0
function list_dir($dir)
{
    $dir_up = dirname($dir);
    if ($dir_up == ".") {
        $dir_up = "";
    }
    if (!get_show_item($dir_up, basename($dir))) {
        show_error($dir . " : " . $GLOBALS["error_msg"]["accessdir"]);
    }
    // make file & dir tables, & get total filesize & number of items
    make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
    $s_dir = $dir;
    if (strlen($s_dir) > 50) {
        $s_dir = "..." . substr($s_dir, -47);
    }
    show_header("<a href='javascript:history.go(-1);'><font color=#0a0a0a>Go Back to Problem List</font></a><br>" . $GLOBALS["messages"]["actdir"] . ": /" . get_rel_item("", $s_dir));
    // Javascript functions:
    include "./.include/javascript.php";
    // Sorting of items
    $_img = "&nbsp;<IMG width=\"10\" height=\"10\" border=\"0\" align=\"ABSMIDDLE\" src=\"_img/";
    if ($GLOBALS["srt"] == "yes") {
        $_srt = "no";
        $_img .= "_arrowup.gif\" ALT=\"^\">";
    } else {
        $_srt = "yes";
        $_img .= "_arrowdown.gif\" ALT=\"v\">";
    }
    // Toolbar
    echo "<BR><TABLE width=\"95%\"><TR><TD><TABLE><TR>\n";
    // PARENT DIR
    echo "<TD><A HREF=\"" . make_link("list", $dir_up, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"_img/_up.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["uplink"] . "\" TITLE=\"" . $GLOBALS["messages"]["uplink"] . "\"></A></TD>\n";
    // HOME DIR
    echo "<TD><A HREF=\"" . make_link("list", NULL, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"_img/_home.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["homelink"] . "\" TITLE=\"" . $GLOBALS["messages"]["homelink"] . "\"></A></TD>\n";
    // RELOAD
    echo "<TD><A HREF=\"javascript:location.reload();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
    echo "align=\"ABSMIDDLE\" src=\"_img/_refresh.gif\" ALT=\"" . $GLOBALS["messages"]["reloadlink"];
    echo "\" TITLE=\"" . $GLOBALS["messages"]["reloadlink"] . "\"></A></TD>\n";
    // SEARCH
    echo "<TD><A HREF=\"" . make_link("search", $dir, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"_img/_search.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["searchlink"] . "\" TITLE=\"" . $GLOBALS["messages"]["searchlink"];
    echo "\"></A></TD>\n";
    echo "<TD>::</TD>";
    // print the edit buttons
    _print_edit_buttons($dir);
    // ADMIN & LOGOUT
    if (login_ok()) {
        echo "<TD>::</TD>";
        // ADMIN
        _print_link("admin", permissions_grant(NULL, NULL, "admin") || permissions_grant(NULL, NULL, "password"), $dir, NULL);
        // LOGOUT
        _print_link("logout", true, $dir, NULL);
    }
    echo "</TR></TABLE></TD>\n";
    // Create File / Dir
    if (permissions_grant($dir, NULL, "create")) {
        echo "<TD align=\"right\"><TABLE><FORM action=\"" . make_link("mkitem", $dir, NULL) . "\" method=\"post\">\n<TR><TD>";
        echo "<SELECT name=\"mktype\"><option value=\"file\">" . $GLOBALS["mimes"]["file"] . "</option>";
        echo "<option value=\"dir\">" . $GLOBALS["mimes"]["dir"] . "</option></SELECT>\n";
        echo "<INPUT name=\"mkname\" type=\"text\" size=\"15\">";
        echo "<INPUT type=\"submit\" value=\"" . $GLOBALS["messages"]["btncreate"];
        echo "\"></TD></TR></FORM></TABLE></TD>\n";
    }
    echo "</TR></TABLE>\n";
    // End Toolbar
    // Begin Table + Form for checkboxes
    echo "<TABLE WIDTH=\"95%\"><FORM name=\"selform\" method=\"POST\" action=\"" . make_link("post", $dir, NULL) . "\">\n";
    echo "<INPUT type=\"hidden\" name=\"do_action\"><INPUT type=\"hidden\" name=\"first\" value=\"y\">\n";
    // Table Header
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR><TD WIDTH=\"2%\" class=\"header\">\n";
    echo "<INPUT TYPE=\"checkbox\" name=\"toggleAllC\" onclick=\"javascript:ToggleAll(this);\"></TD>\n";
    echo "<TD WIDTH=\"44%\" class=\"header\"><B>\n";
    if ($GLOBALS["order"] == "name") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"];
    if ($GLOBALS["order"] == "name") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"10%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "size") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"];
    if ($GLOBALS["order"] == "size") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"16%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "type") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"];
    if ($GLOBALS["order"] == "type") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"14%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "mod") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"];
    if ($GLOBALS["order"] == "mod") {
        echo $_img;
    }
    echo "</A></B></TD><TD WIDTH=\"8%\" class=\"header\"><B>" . $GLOBALS["messages"]["permheader"] . "</B>\n";
    echo "</TD><TD WIDTH=\"6%\" class=\"header\"><B>" . $GLOBALS["messages"]["actionheader"] . "</B></TD></TR>\n";
    echo "<TR><TD colspan=\"7\"><HR></TD></TR>\n";
    // make & print Table using lists
    print_table($dir, make_list($dir_list, $file_list));
    // print number of items & total filesize
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR>\n<TD class=\"header\"></TD>";
    echo "<TD class=\"header\">" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " (";
    if (function_exists("disk_free_space")) {
        $free = parse_file_size(disk_free_space(get_abs_dir($dir)));
    } elseif (function_exists("diskfreespace")) {
        $free = parse_file_size(diskfreespace(get_abs_dir($dir)));
    } else {
        $free = "?";
    }
    // echo "Total: ".parse_file_size(disk_total_space(get_abs_dir($dir))).", ";
    echo $GLOBALS["messages"]["miscfree"] . ": " . $free . ")</TD>\n";
    echo "<TD class=\"header\">" . parse_file_size($tot_file_size) . "</TD>\n";
    for ($i = 0; $i < 4; ++$i) {
        echo "<TD class=\"header\"></TD>";
    }
    echo "</TR>\n<TR><TD colspan=\"7\"><HR></TD></TR></FORM></TABLE>\n";
    ?>
<script language="JavaScript1.2" type="text/javascript">
<!--
	// Uncheck all items (to avoid problems with new items)
	var ml = document.selform;
	var len = ml.elements.length;
	for(var i=0; i<len; ++i) {
		var e = ml.elements[i];
		if(e.name == "selitems[]" && e.checked == true) {
			e.checked=false;
		}
	}
// -->
</script><?php 
}
Ejemplo n.º 9
0
    make_tables("K", $k);
    make_tables("L", $l);
    make_tables("M", $m);
    make_tables("N", $n);
    make_tables("O", $o);
    make_tables("P", $p);
    make_tables("Q", $q);
    make_tables("R", $r);
    make_tables("S", $s);
    make_tables("T", $t);
    make_tables("U", $u);
    make_tables("V", $v);
    make_tables("W", $w);
    make_tables("X", $x);
    make_tables("Y", $y);
    make_tables("Z", $z);
}
?>
    </section>

	<section id="research_submit_box" class="white_box_content">
		<h2>
        	Help this section grow
        </h2>
        
        <p>
       		Consectetur adipisicing elit. Quia accusamus excepturi aut eos non nisi expedita nihil sed! Esse, possimus assumenda asperiores perferendis alias placeat natus dicta nam totam doloribus.Lorem ipsum dolor sit amet, consectetur adipisicing elit. Excepturi, illum quibusdam repellat vel fugiat corrupti pariatur possimus a culpa ad iure eius quisquam sit ex quam nulla saepe doloremque. Atque.
		</p>
        
        <div class="button_link_center">
	        <a class="button_link" href="contact.html">
Ejemplo n.º 10
0
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);
}
Ejemplo n.º 11
0
function list_dir($dir)
{
    // list directory contents
    global $QUIXPATH;
    $allow = ($GLOBALS["permissions"] & 01) == 01;
    $admin = ($GLOBALS["permissions"] & 04) == 04 || ($GLOBALS["permissions"] & 02) == 02;
    $dir_up = dirname($dir);
    if ($dir_up == ".") {
        $dir_up = "";
    }
    if (!get_show_item($dir_up, basename($dir))) {
        show_error($dir . " : " . $GLOBALS["error_msg"]["accessdir"]);
    }
    // make file & dir tables, & get total filesize & number of items
    make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
    $s_dir = $dir;
    if (strlen($s_dir) > 50) {
        $s_dir = "..." . substr($s_dir, -47);
    }
    show_header($GLOBALS["messages"]["actdir"] . ": /" . get_rel_item("", $s_dir));
    // Javascript functions:
    include $QUIXPATH . ".include/javascript.php";
    // Sorting of items
    $_img = "&nbsp;<IMG width=\"10\" height=\"10\" border=\"0\" align=\"ABSMIDDLE\" src=\"../files/quixexplorer/";
    if ($GLOBALS["srt"] == "yes") {
        $_srt = "no";
        $_img .= "_arrowup.gif\" ALT=\"^\">";
    } else {
        $_srt = "yes";
        $_img .= "_arrowdown.gif\" ALT=\"v\">";
    }
    // Toolbar
    echo "<BR><TABLE width=\"95%\"><TR><TD><TABLE><TR>\n";
    // PARENT DIR
    echo "<TD><A HREF=\"" . make_link("list", $dir_up, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_up.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["uplink"] . "\" TITLE=\"" . $GLOBALS["messages"]["uplink"] . "\"></A></TD>\n";
    // HOME DIR
    echo "<TD><A HREF=\"" . make_link("list", NULL, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_home.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["homelink"] . "\" TITLE=\"" . $GLOBALS["messages"]["homelink"] . "\"></A></TD>\n";
    // RELOAD
    echo "<TD><A HREF=\"javascript:location.reload();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
    echo "align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_refresh.gif\" ALT=\"" . $GLOBALS["messages"]["reloadlink"];
    echo "\" TITLE=\"" . $GLOBALS["messages"]["reloadlink"] . "\"></A></TD>\n";
    // SEARCH
    echo "<TD><A HREF=\"" . make_link("search", $dir, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_search.gif\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["searchlink"] . "\" TITLE=\"" . $GLOBALS["messages"]["searchlink"];
    echo "\"></A></TD>\n";
    echo "<TD>::</TD>";
    if ($allow) {
        // COPY
        echo "<TD><A HREF=\"javascript:Copy();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
        echo "align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_copy.gif\" ALT=\"" . $GLOBALS["messages"]["copylink"];
        echo "\" TITLE=\"" . $GLOBALS["messages"]["copylink"] . "\"></A></TD>\n";
        // MOVE
        echo "<TD><A HREF=\"javascript:Move();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
        echo "align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_move.gif\" ALT=\"" . $GLOBALS["messages"]["movelink"];
        echo "\" TITLE=\"" . $GLOBALS["messages"]["movelink"] . "\"></A></TD>\n";
        // DELETE
        echo "<TD><A HREF=\"javascript:Delete();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
        echo "align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_delete.gif\" ALT=\"" . $GLOBALS["messages"]["dellink"];
        echo "\" TITLE=\"" . $GLOBALS["messages"]["dellink"] . "\"></A></TD>\n";
        // UPLOAD
        if (get_cfg_var("file_uploads")) {
            echo "<TD><A HREF=\"" . make_link("upload", $dir, NULL) . "\">";
            echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
            echo "src=\"../files/quixexplorer/_upload.gif\" ALT=\"" . $GLOBALS["messages"]["uploadlink"];
            echo "\" TITLE=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></A></TD>\n";
        } else {
            echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
            echo "src=\"../files/quixexplorer/_upload_.gif\" ALT=\"" . $GLOBALS["messages"]["uploadlink"];
            echo "\" TITLE=\"" . $GLOBALS["messages"]["uploadlink"] . "\"></TD>\n";
        }
        // ARCHIVE
        if ($GLOBALS["zip"] || $GLOBALS["tar"] || $GLOBALS["tgz"]) {
            echo "<TD><A HREF=\"javascript:Archive();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
            echo "align=\"ABSMIDDLE\" src=\"../files/quixexplorer/_archive.gif\" ALT=\"" . $GLOBALS["messages"]["comprlink"];
            echo "\" TITLE=\"" . $GLOBALS["messages"]["comprlink"] . "\"></A></TD>\n";
        }
    } else {
        // COPY
        echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
        echo "src=\"../files/quixexplorer/_copy_.gif\" ALT=\"" . $GLOBALS["messages"]["copylink"] . "\" TITLE=\"";
        echo $GLOBALS["messages"]["copylink"] . "\"></TD>\n";
        // MOVE
        echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
        echo "src=\"../files/quixexplorer/_move_.gif\" ALT=\"" . $GLOBALS["messages"]["movelink"] . "\" TITLE=\"";
        echo $GLOBALS["messages"]["movelink"] . "\"></TD>\n";
        // DELETE
        echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
        echo "src=\"../files/quixexplorer/_delete_.gif\" ALT=\"" . $GLOBALS["messages"]["dellink"] . "\" TITLE=\"";
        echo $GLOBALS["messages"]["dellink"] . "\"></TD>\n";
        // UPLOAD
        echo "<TD><IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
        echo "src=\"../files/quixexplorer/_upload_.gif\" ALT=\"" . $GLOBALS["messages"]["uplink"];
        echo "\" TITLE=\"" . $GLOBALS["messages"]["uplink"] . "\"></TD>\n";
    }
    // ADMIN & LOGOUT
    if ($GLOBALS["require_login"]) {
        echo "<TD>::</TD>";
        // ADMIN
        if ($admin) {
            echo "<TD><A HREF=\"" . make_link("admin", $dir, NULL) . "\">";
            echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
            echo "src=\"../files/quixexplorer/_admin.gif\" ALT=\"" . $GLOBALS["messages"]["adminlink"] . "\" TITLE=\"";
            echo $GLOBALS["messages"]["adminlink"] . "\"></A></TD>\n";
        }
        // LOGOUT
        echo "<TD><A HREF=\"" . make_link("logout", NULL, NULL) . "\">";
        echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" ";
        echo "src=\"../files/quixexplorer/_logout.gif\" ALT=\"" . $GLOBALS["messages"]["logoutlink"] . "\" TITLE=\"";
        echo $GLOBALS["messages"]["logoutlink"] . "\"></A></TD>\n";
    }
    echo "</TR></TABLE></TD>\n";
    // Create File / Dir
    if ($allow) {
        echo "<TD align=\"right\"><TABLE><FORM action=\"" . make_link("mkitem", $dir, NULL) . "\" method=\"post\">\n<TR><TD>";
        echo "<SELECT name=\"mktype\"><option value=\"file\">" . $GLOBALS["mimes"]["file"] . "</option>";
        echo "<option value=\"dir\">" . $GLOBALS["mimes"]["dir"] . "</option></SELECT>\n";
        echo "<INPUT name=\"mkname\" type=\"text\" size=\"15\">";
        echo "<INPUT type=\"submit\" value=\"" . $GLOBALS["messages"]["btncreate"];
        echo "\"></TD></TR></FORM></TABLE></TD>\n";
    }
    echo "</TR></TABLE>\n";
    // End Toolbar
    // Begin Table + Form for checkboxes
    echo "<TABLE WIDTH=\"95%\"><FORM name=\"selform\" method=\"POST\" action=\"" . make_link("post", $dir, NULL) . "\">\n";
    echo "<INPUT type=\"hidden\" name=\"do_action\"><INPUT type=\"hidden\" name=\"first\" value=\"y\">\n";
    // Table Header
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR><TD WIDTH=\"2%\" class=\"header\">\n";
    echo "<INPUT TYPE=\"checkbox\" name=\"toggleAllC\" onclick=\"javascript:ToggleAll(this);\"></TD>\n";
    echo "<TD WIDTH=\"44%\" class=\"header\"><B>\n";
    if ($GLOBALS["order"] == "name") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"];
    if ($GLOBALS["order"] == "name") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"10%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "size") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"];
    if ($GLOBALS["order"] == "size") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"16%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "type") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"];
    if ($GLOBALS["order"] == "type") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"14%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "mod") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"];
    if ($GLOBALS["order"] == "mod") {
        echo $_img;
    }
    echo "</A></B></TD><TD WIDTH=\"8%\" class=\"header\"><B>" . $GLOBALS["messages"]["permheader"] . "</B>\n";
    echo "</TD><TD WIDTH=\"6%\" class=\"header\"><B>" . $GLOBALS["messages"]["actionheader"] . "</B></TD></TR>\n";
    echo "<TR><TD colspan=\"7\"><HR></TD></TR>\n";
    // make & print Table using lists
    print_table($dir, make_list($dir_list, $file_list), $allow);
    // print number of items & total filesize
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR>\n<TD class=\"header\"></TD>";
    echo "<TD class=\"header\">" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " (";
    if (function_exists("disk_free_space")) {
        $free = parse_file_size(disk_free_space(get_abs_dir($dir)));
    } elseif (function_exists("diskfreespace")) {
        $free = parse_file_size(diskfreespace(get_abs_dir($dir)));
    } else {
        $free = "?";
    }
    // echo "Total: ".parse_file_size(disk_total_space(get_abs_dir($dir))).", ";
    echo $GLOBALS["messages"]["miscfree"] . ": " . $free . ")</TD>\n";
    echo "<TD class=\"header\">" . parse_file_size($tot_file_size) . "</TD>\n";
    for ($i = 0; $i < 4; ++$i) {
        echo "<TD class=\"header\"></TD>";
    }
    echo "</TR>\n<TR><TD colspan=\"7\"><HR></TD></TR></FORM></TABLE>\n";
    ?>
<script language="JavaScript1.2" type="text/javascript">
<!--
	// Uncheck all items (to avoid problems with new items)
	var ml = document.selform;
	var len = ml.elements.length;
	for(var i=0; i<len; ++i) {
		var e = ml.elements[i];
		if(e.name == "selitems[]" && e.checked == true) {
			e.checked=false;
		}
	}
// -->
</script><?php 
}
Ejemplo n.º 12
0
/**
MAIN FUNCTION
*/
function list_dir($dir)
{
    _debug("list_dir: displaying directory {$dir}");
    if (!get_show_item($dir, NULL)) {
        show_error($GLOBALS["error_msg"]["accessdir"] . " : '{$dir}'");
    }
    // make file & dir tables, & get total filesize & number of items
    make_tables($dir, $dir_list, $file_list, $tot_file_size, $num_items);
    $s_dir = $dir;
    if (strlen($s_dir) > 50) {
        $s_dir = "..." . substr($s_dir, -47);
    }
    show_header($GLOBALS["messages"]["actdir"] . ": " . _breadcrumbs($dir));
    // show_header($GLOBALS["messages"]["actdir"].": /".get_rel_item("",$s_dir));
    // Javascript functions:
    include "./_include/javascript.php";
    // Sorting of items
    $_img = "&nbsp;<IMG width=\"10\" height=\"10\" border=\"0\" align=\"ABSMIDDLE\" src=\"_img/";
    if ($GLOBALS["srt"] == "yes") {
        $_srt = "no";
        $_img .= "_arrowup.gif\" ALT=\"^\">";
    } else {
        $_srt = "yes";
        $_img .= "_arrowdown.gif\" ALT=\"v\">";
    }
    // Toolbar
    echo "<BR><TABLE width=\"95%\"><TR><TD><TABLE><TR>\n";
    // PARENT DIR
    echo "<TD><A HREF=\"" . make_link("list", path_up($dir), NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"" . $GLOBALS["baricons"]["up"] . "\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["uplink"] . "\" TITLE=\"" . $GLOBALS["messages"]["uplink"] . "\"></A></TD>\n";
    // HOME DIR
    echo "<TD><A HREF=\"" . make_link("list", NULL, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"" . $GLOBALS["baricons"]["home"] . "\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["homelink"] . "\" TITLE=\"" . $GLOBALS["messages"]["homelink"] . "\"></A></TD>\n";
    // RELOAD
    echo "<TD><A HREF=\"javascript:location.reload();\"><IMG border=\"0\" width=\"16\" height=\"16\" ";
    echo "align=\"ABSMIDDLE\" src=\"" . $GLOBALS["baricons"]["reload"] . "\" ALT=\"" . $GLOBALS["messages"]["reloadlink"];
    echo "\" TITLE=\"" . $GLOBALS["messages"]["reloadlink"] . "\"></A></TD>\n";
    // SEARCH
    echo "<TD><A HREF=\"" . make_link("search", $dir, NULL) . "\">";
    echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"" . $GLOBALS["baricons"]["search"] . "\" ";
    echo "ALT=\"" . $GLOBALS["messages"]["searchlink"] . "\" TITLE=\"" . $GLOBALS["messages"]["searchlink"];
    echo "\"></A></TD>\n";
    echo "<TD>::</TD>";
    // print the download button
    _print_link("download_selected", permissions_grant($dir, NULL, "read"), $dir, NULL);
    // print the edit buttons
    _print_edit_buttons($dir);
    // ADMIN & LOGOUT
    if (login_is_user_logged_in()) {
        echo "<TD>::</TD>";
        // ADMIN
        _print_link("admin", permissions_grant(NULL, NULL, "admin") || permissions_grant(NULL, NULL, "password"), $dir, NULL);
        // LOGOUT
        _print_link("logout", true, $dir, NULL);
    }
    echo "<TD>::</TD>";
    //Languages
    foreach ($GLOBALS["langs"] as $langs) {
        echo "<TD><A HREF=\"" . make_link("list", $dir, NULL, NULL, NULL, $langs[0]) . "\">";
        if (!file_exists($langs[1])) {
            echo "&nbsp;{$langs['0']} ";
        } else {
            echo "<IMG border=\"0\" width=\"16\" height=\"11\" ";
            echo "align=\"ABSMIDDLE\" src=\"" . $langs[1] . "\" ALT=\"" . $langs[0];
            echo "\" TITLE=\"" . $langs[2] . "\"/></A></TD>\n";
        }
        //list($slang,$img,$ext,$type)	= $mime;
        /*if(@eregi($ext,$item)) {
        			$mime_type	= $desc;
        			$image		= $img;
        			if($query=="img"){ return $image;}
        			else if($query=="ext"){ return $type;}
        			else return $mime_type;
        		*/
    }
    //
    echo "</TR></TABLE></TD>\n";
    // Create File / Dir
    if (permissions_grant($dir, NULL, "create")) {
        echo "<TD align=\"right\"><TABLE><FORM action=\"" . make_link("mkitem", $dir, NULL) . "\" method=\"post\">\n<TR><TD>";
        echo "<IMG border=\"0\" width=\"16\" height=\"16\" align=\"ABSMIDDLE\" src=\"" . $GLOBALS["baricons"]["add"] . "\" />";
        echo "<SELECT name=\"mktype\">";
        echo "<option value=\"file\">" . $GLOBALS["mimes"]["file"] . "</option>";
        echo "<option value=\"dir\">" . $GLOBALS["mimes"]["dir"] . "</option></SELECT>\n";
        echo "<INPUT name=\"mkname\" type=\"text\" size=\"15\">";
        echo "<INPUT type=\"submit\" value=\"" . $GLOBALS["messages"]["btncreate"];
        echo "\"></TD></TR></FORM></TABLE></TD>\n";
    }
    echo "</TR></TABLE>\n";
    // End Toolbar
    // Begin Table + Form for checkboxes
    echo "<TABLE WIDTH=\"95%\"><FORM name=\"selform\" method=\"POST\" action=\"" . make_link("post", $dir, NULL) . "\">\n";
    echo "<INPUT type=\"hidden\" name=\"do_action\"><INPUT type=\"hidden\" name=\"first\" value=\"y\">\n";
    // Table Header
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR><TD WIDTH=\"2%\" class=\"header\">\n";
    echo "<INPUT TYPE=\"checkbox\" name=\"toggleAllC\" onclick=\"javascript:ToggleAll(this);\"></TD>\n";
    echo "<TD WIDTH=\"44%\" class=\"header\"><B>\n";
    if ($GLOBALS["order"] == "name") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "name", $new_srt) . "\">" . $GLOBALS["messages"]["nameheader"];
    if ($GLOBALS["order"] == "name") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"10%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "size") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "size", $new_srt) . "\">" . $GLOBALS["messages"]["sizeheader"];
    if ($GLOBALS["order"] == "size") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"16%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "type") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "type", $new_srt) . "\">" . $GLOBALS["messages"]["typeheader"];
    if ($GLOBALS["order"] == "type") {
        echo $_img;
    }
    echo "</A></B></TD>\n<TD WIDTH=\"14%\" class=\"header\"><B>";
    if ($GLOBALS["order"] == "mod") {
        $new_srt = $_srt;
    } else {
        $new_srt = "yes";
    }
    echo "<A href=\"" . make_link("list", $dir, NULL, "mod", $new_srt) . "\">" . $GLOBALS["messages"]["modifheader"];
    if ($GLOBALS["order"] == "mod") {
        echo $_img;
    }
    echo "</A></B></TD><TD WIDTH=\"8%\" class=\"header\"><B>" . $GLOBALS["messages"]["permheader"] . "</B>\n";
    echo "</TD><TD WIDTH=\"6%\" class=\"header\"><B>" . $GLOBALS["messages"]["actionheader"] . "</B></TD></TR>\n";
    echo "<TR><TD colspan=\"7\"><HR></TD></TR>\n";
    // make & print Table using lists
    print_table($dir, make_list($dir_list, $file_list));
    // print number of items & total filesize
    echo "<TR><TD colspan=\"7\"><HR></TD></TR><TR>\n<TD class=\"header\"></TD>";
    echo "<TD class=\"header\">" . $num_items . " " . $GLOBALS["messages"]["miscitems"] . " (";
    $free = parse_file_size(diskfreespace("/"));
    echo $GLOBALS["messages"]["miscfree"] . ": " . $free . ")</TD>\n";
    echo "<TD class=\"header\">" . parse_file_size($tot_file_size) . "</TD>\n";
    echo "<TD class=\"header\" colspan=4></TD>";
    echo "</TR>\n<TR><TD colspan=\"7\"><HR></TD></TR></FORM></TABLE>\n";
    ?>
<script language="JavaScript1.2" type="text/javascript">
<!--
	// Uncheck all items (to avoid problems with new items)
	var ml = document.selform;
	var len = ml.elements.length;
	for(var i=0; i<len; ++i) {
		var e = ml.elements[i];
		if(e.name == "selitems[]" && e.checked == true) {
			e.checked=false;
		}
	}
// -->
</script><?php 
}
Ejemplo n.º 13
0
Archivo: admin.php Proyecto: philum/cms
function admin()
{
    $qb = ses('qb');
    $qda = ses('qda');
    $qdu = ses('qdu');
    $USE = ses('USE');
    $auth = ses('auth');
    $admin = $_GET['admin'] ? $_SESSION['admin'] = $_GET['admin'] : $_SESSION['admin'];
    if ($_GET['set']) {
        $_SESSION['set'] = $_GET['set'];
    }
    if ($USE != "") {
        $hubname = rse("hub", $qdu . ' WHERE name="' . $qb . '"');
        if (!$hubname) {
            $hubname = $qb;
        }
        list($autologok, $userhub) = sql('name,hub', 'qdu', 'r', 'ip="' . hostname() . '"');
    }
    $rep = "params";
    //verif_user
    if ($USE != $qb && $USE != "" && $userhub) {
        $hub = lka('/' . $USE, $USE);
    } elseif ($USE != $qb && $USE != "" && $autologok != $USE && $autologok) {
        $alert .= lkc('txtx', '/?log=on', 'autolog') . ' ';
    } elseif ($USE == $qb && !$userhub && prmb(11) >= 4) {
        $alert .= lkc("txtred", "/?log=create_hub", "create_hub!");
    } elseif ($USE == "") {
        $reta = lkc('txtx', htac('module') . 'Home', $qb) . br() . br() . loged($USE, $_SESSION['iq'], "", 7) . br();
    }
    //admin_menu
    $aff = adminauthes();
    if ($admin == "=") {
        $_SESSION['set'] = $_GET['set'] = $USE ? "Global" : "User";
    }
    //defaults
    if ($aff[$_GET['set']]) {
        $admin = key($aff[$_GET['set']]);
    }
    $_SESSION['admin'] = $admin;
    $goto = '/?admin=' . $admin;
    //if(!$userhub){unset($aff['User']['mail']); unset($aff['User']['password']);}
    //auto_select_category
    foreach ($aff as $k => $v) {
        if ($v[$admin]) {
            $_SESSION['set'] = $k;
            $curauth = $v[$admin];
        }
        $raf = array_merge_b($raf, array_keys($v));
    }
    if ($curauth === false) {
        $curauth = 7;
    }
    //login
    if ($USE) {
        $w .= lkc('popw', htac('module') . 'Home', pictxt('home', $hubname)) . ' ';
        $w .= btn("popbt", pictxt('user', $USE . ' ' . asciinb($auth)) . ' (' . nameofauthes($auth) . ')');
    }
    //fastmenu
    $fmn = array('console', 'params', 'restrictions', 'apps', 'css', 'finder', 'templates', 'connectors', 'plugin', 'msql', 'tools', 'pictos', 'stats', 'update');
    foreach ($raf as $v) {
        if (in_array($v, $fmn)) {
            $tit .= lkc(active($admin, $v), htac('admin') . $v, pictit(mimes_types($v), $v)) . ' ';
        }
    }
    $reta .= divc('right', $w . $alert);
    $tit .= lkc('txtit', htac('admin') . $admin, $admin) . ' ';
    if ($admin != "=") {
        $reta .= div('', $tit);
    }
    if ($auth >= 7 && $admin == 'update') {
        $ret = adm_update();
    }
    if ($auth >= $curauth && $curauth) {
        switch ($admin) {
            //global
            case 'console':
                $ret = adm_console($auth);
                break;
            case 'apps':
                require_once 'adminx.php';
                $ret = adm_apps($_GET['set'], '', $_GET['dig']);
                break;
            case 'messages':
                if ($qb == $USE or $auth >= $curauth) {
                    $ret = adm_messages();
                } else {
                    $ret = contact(nms(84), 'txtcadr');
                }
                break;
            case 'hubs':
                $ret = adm_hubs($auth);
                break;
            case 'nodes':
                $ret = adm_nodes($auth, $goto);
                break;
            case 'stats':
                list($p, $o) = explode('/', $_GET['set']);
                $ret = plugin('stats', $p, $o);
                break;
            case 'newsletter':
                $ret = adm_newsletter($_GET['send']);
                break;
            case 'disk':
                $ret = plugin('disk', '', '');
                break;
            case 'share':
                $ret = plugin('share', '', '');
                break;
            case 'tickets':
                $ret = plugin('tickets', '', '');
                break;
            case 'faq':
                $r = msql_read('system', 'program_faq', '');
                $ret = nl2br(stripslashes(make_divtable($r, 1)));
                break;
        }
        //articles
        if ($_SESSION['set'] == 'Articles') {
            switch ($admin) {
                case 'create':
                    $ret = f_inp('', '');
                    break;
                case 'categories':
                    $ret = catarts();
                    break;
                case 'trackbacks':
                    req('mod,art');
                    $ret = trkarts('');
                    break;
                default:
                    $ret = adminarts();
                    break;
            }
        }
        switch ($admin) {
            case 'chat':
                require_once 'art.php';
                $ret = output_trk(read_idy('microchat', 'DESC'));
                break;
            case 'shop':
                $ret = helps('shop_class');
                break;
            case 'book':
                $ret = lkc('txtblc', '/plug/book.php', 'book');
                break;
        }
        //configs
        switch ($admin) {
            case 'restrictions':
                $ret = adm_restrictions();
                break;
            case 'params':
                $ret = adm_params($curauth, rep);
                break;
            case 'avatar':
                if ($USE) {
                    $ret = adm_avatar(0);
                }
                break;
            case 'mail':
                if ($_POST['amail']) {
                    if ($USE == $qb) {
                        $_SESSION['qbin']['adminmail'] = $_POST['amail'];
                    }
                    update('qdu', 'mail', $_POST['amail'], 'name', $USE);
                }
                $ml = rse('mail', $qdu . ' WHERE name = "' . $USE . '"');
                if ($ml) {
                    $valu = input2('text', 'amail', $ml . '" size="35" maxlength="50') . ' ' . input2('submit', 'Submit', 'modif_mail', '');
                }
                $ret = form($goto, $valu);
                break;
            case 'password':
                $ret = set_password($USE);
                break;
            case 'banner':
                $ret = set_ban();
                break;
            case 'descript':
                $ret = editbrain($admin);
                break;
            case 'google':
                $ret = editbrain($admin);
                break;
            case 'members':
                $ret = adm_members_a($auth, $goto);
                break;
            case 'authes':
                $titles = array('fonction', 'auth');
                if (auth(6)) {
                    $ret = msqlink('system', 'admin_authes') . br();
                }
                foreach ($aff as $k => $v) {
                    $datas = '';
                    arsort($v);
                    foreach ($v as $ka => $va) {
                        $datas[$ka] = array($va);
                    }
                    $outre[$k] = make_tables($titles, $datas, 'txtblc', '');
                }
                $ret .= make_tabs($outre, 'at');
                break;
        }
        //constructors
        switch ($admin) {
            case 'css':
                $ret = adm_editcss();
                break;
            case 'fonts':
                $ret = edit_fonts();
                break;
            case 'connectors':
                $ret = data_brain('connectors') . br() . br();
                $ret .= lkc('txtblc', $goto . '&help==', 'connectors_infos') . br();
                if ($_GET['help']) {
                    $ret .= conn_help() . br();
                }
                break;
            case 'modules':
                $ret = data_brain('modules') . br() . br() . adm_mod_hlp($goto);
                break;
            case 'templates':
                $ret = data_brain('template');
                break;
            case 'plugin':
                $ret = adm_plugin();
                break;
            case 'msql':
                $ret = adm_msql();
                break;
            case 'dev':
                $ret = plugin('dev', '', '');
                break;
            case 'editags':
                req('meta');
                $ret = admin_tags(get('set'));
                break;
            case 'finder':
                $ret = call_finder($qb, 'disk');
                break;
            case 'backup':
                $ret = adm_backup($qb, $auth, $goto, $rep);
                break;
            case 'update_notes':
                $ret .= adm_update_notes('', 1);
                break;
            case 'plug':
                $ret .= adm_edit_plug();
                break;
        }
        if ($admin && !$ret && $auth >= $curauth) {
            //editbrain
            $ret = plugin($admin, $_GET['p'], $_GET['o']);
        }
    } else {
        switch ($admin) {
            case 'members':
                $ret = adm_members_b();
                break;
        }
    }
    #render
    if ($_SESSION['admin'] && !$_GET['callj']) {
        $head = $reta . br();
    } else {
        $head = bal('h2', lka('/admin/' . $_SESSION['admin'], $_SESSION['admin'])) . br();
    }
    return $head . $ret;
}