示例#1
0
$usrbdate = $result['bday'];
$usrpnumb = $result['phone'];
if (file_exists("../data/" . $usrid . "/img/usrphotnew.jpg")) {
    unlink("../data/" . $userid . "/img/usrphotnew.jpg");
}
if (file_exists("../data/" . $usrid . "/img/usrphot.jpg")) {
    echo "<img hspace='10px' vspace='10px' align='left' width='200px' height='200px' \n\t      src='data/" . $usrid . "/img/usrphot.jpg' style='border:1px solid #bfb2eb'>";
} else {
    echo "<img hspace='10px' vspace='10px' align='left' width='200px' height='200px' \n\tstyle='border:1px solid #000' alt='No Profile Picture'>";
}
?>

<div id="Nameinfo" align="left" style="padding-top:10px;">

<?php 
echo "<table>\n\t\t\t<tr><td>Firstname </td><td>: " . $fstname . "</td></tr>\n\t\t\t<tr><td>Lastname </td><td>: " . $lstname . "</td></tr>\n\t\t\t<tr><td>Username </td><td>: " . $usrname . "</td></tr>\n\t\t\t<tr><td>Email </td><td>: " . $usremail . "</td></tr>\n\t\t\t<tr><td>Gender </td><td>: " . $usrgender . "</td></tr>\n\t\t\t<tr><td>Birthdate </td><td>: " . $usrbdate . "</td></tr>\n\t\t\t<tr><td>Phone Number </td><td>: " . $usrpnumb . "</td></tr>\n\t\t\t<tr><td>Directories </td><td>: " . countdir($usrid) . " Directories</td></tr>\n\t\t\t<tr><td>Files </td><td>: " . countfile($usrid) . " Files</td></tr>\n\t\t\t<tr><td>Space Used </td><td>: " . countspace($usrid) . " MB of 5000 MB</td></tr>\n\t\t</table>";
?>

<input type="button" class="btn" onclick="editusr(<?php 
echo $usrid;
?>
)" value="Edit Data"/>

<?php 
if ($_SESSION['admin']) {
    echo "\n\t<input type='button' class='btn' onclick='usrfile(" . $usrid . ")' value='Files'/>\n\t<input type='button' class='btn' onclick='remusr(" . $usrid . ",1)' value='Delete User'/>";
} else {
    echo "<input type='button' class='btn' onclick='remusr(" . $usrid . ",2)' value='Delete User'/>";
}
?>
示例#2
0
	<div id="lowupusr">
	<table width='100%'>
		<tr>
			<th align='center' width="140px">Userid</th>
			<th align='center' width="250px">Username</th>
			<th align='center' width="110px">Type</th>
			<th align='center' width="140px">Directories</th>
			<th align='center' width="140px">Files</th>
			<th align='center' width="180px">Used Space</th>
			<th align='center' width='150px'>Join Date</th>
		</tr>
	</table>
	</div>
</div>

<?php 
require "../config/connect.php";
require "../engine/countdirfile.php";
require "../engine/countspace.php";
//This is User List
if (isset($_POST['str'])) {
    //Search Mode
    $list = mysql_query("select * from users where username like '%" . $_POST['str'] . "%' order by userid") or die(mysql_error());
} else {
    //Listing Mode
    $list = mysql_query("select * from users order by userid") or die(mysql_error());
}
//Fetching Result
while ($result = mysql_fetch_array($list)) {
    echo "<table class='lstusr' width='100%' cellspacing='0' cellpadding='0' style='border-bottom:1px solid #bfb2eb;padding:5;'>\n\t\t\t<tr onclick='vwprofile(" . $result['userid'] . ")' class='lstusrn'>\n\t\t\t\t<td align='center' width='150px'>" . $result['userid'] . "</td>\n\t\t\t\t<td align='center' width='280px'>" . UCFirst($result['username']) . "</td>\n\t\t\t\t<td align='center' width='120px'>" . UCFirst($result['type']) . "</td>\n\t\t\t\t<td align='center' width='150px'>" . countdir($result['userid']) . " Directories</td>\n\t\t\t\t<td align='center' width='160px'>" . countfile($result['userid']) . " Files</td>\n\t\t\t\t<td align='center' width='200px'>" . countspace($result['userid']) . " MB Used Space</td>\n\t\t\t\t<td align='center' width='160px'>" . $result['jdate'] . "</td>\n\t\t  </tr>\n\t\t </table>";
}
示例#3
0
function countdir($dir, $level_count = 0)
{
    global $totallines, $totalfiles, $totaldirs, $totalbytes;
    if (!@($thisdir = opendir($dir))) {
        return;
    }
    while ($item = readdir($thisdir)) {
        if (is_dir($dir . '/' . $item) && substr($item, 0, 1) != '.' && !in_array($dir . $item, $GLOBALS['CONFIG']['IGNORE_DIRS'])) {
            countdir($dir . '/' . $item, $level_count + 1);
        }
    }
    if ($level_count >= 0) {
        $dir = ereg_replace('[/][/]', '/', $dir);
        $handle = opendir($dir);
        while ($file = readdir($handle)) {
            if ($file != '.' && $file != '..' && !is_dir($file)) {
                $totalfiles++;
                if (iswebtype($file)) {
                    $lines = file($dir . '/' . $file);
                    $linecount = 0;
                    foreach ($lines as $line) {
                        if (substr(eregi_replace(' ', '', $line), 0, 2) != '//' | '/*') {
                            $linecount++;
                        }
                    }
                    $totallines = $totallines + $linecount;
                    $totalbytes = $totalbytes + filesize($dir . '/' . $file);
                }
            }
        }
        $totaldirs++;
    }
    return array(intval($totalbytes), intval($totallines), intval($totalfiles), intval($totaldirs));
}