function getList($iArticleID = '')
{
    global $site;
    $ret = '<a href="' . $gConfig['site_url'] . 'admin/wbooks.php">All by create date</a><br><form method="GET">Search by title: <input type="text" name="searchID"> <input type=submit name=find value="Find"></form><br><br>
	<table width=100%>';
    $iDivis = 20;
    $iCurr = 1;
    if (!isset($_REQUEST['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        if ($_REQUEST['commPage'] <= 0) {
            $_REQUEST['commPage'] = 1;
        }
        $iCurr = (int) $_REQUEST['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sQuery = "select b.*,p.NickName,p.ID uID from Store b inner join Profiles p on p.ID=b.userID where b.ID>0 " . (trim($_GET['searchID']) != '' ? ' and (b.Title like "%' . mysql_escape_string($_GET['searchID']) . '%" ) ' : '') . "  and type=1 order by b.ID desc";
    $rElems = mysql_query($sQuery);
    $iNums = mysql_num_rows($rElems);
    $count = (int) ($iNums / $iDivis);
    if ($iNums / $iDivis > (int) ($iNums / $iDivis)) {
        $count++;
    }
    $nav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr, '', 'commPage') : '';
    $rElems = mysql_query($sQuery . $sLimit);
    $ret .= '<tr><td valign=top><b>Title</b></td><td valign=top><b>Date</b></td><td valign=top><b>Author</b></td><td valign=top></td></tr>';
    while ($book = mysql_fetch_assoc($rElems)) {
        $ret .= '<tr><td valign=top><a href="wproduct.php?ID=' . $book['ID'] . '" target="blank">' . $book['Title'] . '</a></td>
		<td valign=top nowrap>' . date("d-m-Y H:i", $book['date']) . ' </td>
		<td valign=top> <a href="profile.php?ID=' . $book['uID'] . '" target="blank">' . $book['NickName'] . '</a></td>
		<td valign=top>&nbsp;&nbsp;&nbsp;<a href="javascript:if(confirm(\'Delete product?\')) top.window.location=\'' . $gConfig['site_url'] . 'admin/wbooks.php?del&ID=' . $book['ID'] . (isset($_GET['demo']) ? '&demo=1' : '') . '\';">Delete</a></td></tr>';
    }
    $ret .= '</table><br><br>' . $nav;
    return $ret;
}
示例#2
0
function getList($iArticleID = '')
{
    global $site;
    $ret = '
	<table width=100%><tr><td valign=top><b>Type</b></td><td valign=top><b>Name</b></td><td valign=top><b>Date</b></td><td valign=top><b>From</b></td><td valign=top></td></tr>';
    $iDivis = 20;
    $iCurr = 1;
    if (!isset($_REQUEST['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        if ($_REQUEST['commPage'] <= 0) {
            $_REQUEST['commPage'] = 1;
        }
        $iCurr = (int) $_REQUEST['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sQuery = "select * from Flags order by ID desc";
    $rElems = mysql_query($sQuery);
    $iNums = mysql_num_rows($rElems);
    $count = (int) ($iNums / $iDivis);
    if ($iNums / $iDivis > (int) ($iNums / $iDivis)) {
        $count++;
    }
    $nav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr, '', 'commPage') : '';
    $rElems = mysql_query($sQuery . $sLimit);
    while ($a = mysql_fetch_assoc($rElems)) {
        if ($a['type'] == 0) {
            $url = 'profile';
            $type = 'Profile: ';
            $info = mysql_fetch_assoc(mysql_query("select * from Profiles where ID=" . $a['itemID']));
            $info = $info['fname'] . ' ' . $info['lname'];
        } elseif ($a['type'] == 1) {
            $url = 'product';
            $type = 'Product(sale): ';
            $info = mysql_fetch_assoc(mysql_query("select * from Store where type=0 and ID=" . $a['itemID']));
            $info = $info['Title'];
        } else {
            $url = 'wproduct';
            $type = 'Product(wanted): ';
            $info = mysql_fetch_assoc(mysql_query("select * from Store where type=1 and ID=" . $a['itemID']));
            $info = $info['Title'];
        }
        $from = mysql_fetch_assoc(mysql_query("select * from Profiles where ID=" . $a['userID']));
        $from = $from['fname'] . ' ' . $from['lname'];
        $ret .= '<tr>
		<td valign=top><b>' . $type . '</b></td>
		<td valign=top><a target="_blank" href="' . $url . '.php?ID=' . $a['itemID'] . '">' . $info . '</a></td>
		<td valign=top>' . date("d-m-Y H:i", $a['date']) . '</td>
		<td valign=top><a href="profile.php?ID=' . $a['userID'] . '">' . $from . '</a></td>
		<td valign=top><a href="javascript:if(confirm(\'Delete flag?\')) top.window.location=\'' . $gConfig['site_url'] . 'admin/flags.php?del&ID=' . $a['ID'] . (isset($_GET['demo']) ? '&demo=1' : '') . '\';">Del</a></td></tr>';
    }
    $ret .= '</table><br>' . $nav;
    return $ret;
}
function getList($iArticleID = '')
{
    global $site;
    $ret = '<a href="' . $gConfig['site_url'] . 'admin/pphoto.php">All</a> <br><form method="GET">Search by user ID or NickName: <input type="text" name="searchID"> <input type=submit name=find value="Find"></form><br><br>
	<table width=100%>';
    $iDivis = 30;
    $iCurr = 1;
    if (!isset($_REQUEST['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        if ($_REQUEST['commPage'] <= 0) {
            $_REQUEST['commPage'] = 1;
        }
        $iCurr = (int) $_REQUEST['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sQuery = "select * from Profiles where ID>0 " . (trim($_GET['searchID']) != '' ? ' and (ID=' . intval($_GET['searchID']) . ' or NickName like "%' . mysql_escape_string(trim($_GET['searchID'])) . '%")' : '') . " and PrimPhoto<>'' order by LastModified desc";
    $rElems = mysql_query($sQuery);
    $iNums = mysql_num_rows($rElems);
    $count = (int) ($iNums / $iDivis);
    if ($iNums / $iDivis > (int) ($iNums / $iDivis)) {
        $count++;
    }
    $nav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr, '', 'commPage') : '';
    $rElems = mysql_query($sQuery . $sLimit);
    $ret .= '<tr><td valign=top width=100px></td><td valign=top><b>User</b></td><td valign=top><b>Download Date</b></td><td valign=top></td></tr>';
    while ($book = mysql_fetch_assoc($rElems)) {
        $prof_photo = 'media/images/profile/' . $book['ID'] . '/thumb_' . $book['PrimPhoto'];
        $groupImageUrl = $prof_photo;
        $ret .= '<tr><td valign=top width=100px><a href="' . $groupImageUrl . '" target="blank"><img src="' . $groupImageUrl . '" style="width:80px"></a></td>
		<td valign=top><a target="_blank" href="profile.php?ID=' . $book['ID'] . '" target="blank">' . $book['NickName'] . '</a></td>
		<td valign=top>' . date("d-m-Y H:i", $book['LastModified']) . '</td>
		<td valign=top>&nbsp;&nbsp;&nbsp;<a href="javascript:if(confirm(\'Delete photo?\')) top.window.location=\'' . $gConfig['site_url'] . 'admin/pphoto.php?del&ID=' . $book['ID'] . (isset($_GET['demo']) ? '&demo=1' : '') . '\';">Delete photo</a></td></tr>';
    }
    $ret .= '</table><br><br>' . $nav;
    return $ret;
}
function getList($iArticleID = '')
{
    global $site;
    $ret = '<form method="GET">Search by author ID: <input type="text" name="searchID"> or review text <input type="text" name="searchTEXT"> <input type=submit name=find value="Find"></form><br><br>
	<table cellspacing=0 cellpadding=0 width=100%>';
    $iDivis = 20;
    $iCurr = 1;
    if (!isset($_REQUEST['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        if ($_REQUEST['commPage'] <= 0) {
            $_REQUEST['commPage'] = 1;
        }
        $iCurr = (int) $_REQUEST['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sQuery = "select m.*,p.NickName from ProfilesRating m left join Profiles p on p.ID=m.userID where m.ID>0 " . (intval($_GET['searchID']) > 0 ? ' and m.userID=' . intval($_GET['searchID']) : '') . " " . (trim($_GET['searchTEXT']) != '' ? ' and (m.Title like "%' . mysql_escape_string($_GET['searchTEXT']) . '%" or m.Text like "%' . mysql_escape_string($_GET['searchTEXT']) . '%") ' : '') . " order by m.ID desc";
    $rElems = mysql_query($sQuery);
    $iNums = mysql_num_rows($rElems);
    $count = (int) ($iNums / $iDivis);
    if ($iNums / $iDivis > (int) ($iNums / $iDivis)) {
        $count++;
    }
    $nav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr, '', 'commPage') : '';
    $rElems = mysql_query($sQuery . $sLimit);
    $ret .= '<tr ><td><b>Author UserName</b></td><td><b>Title</b></td><td><b>Text</b></td><td><b>Date</b></td><td></td></tr>';
    while ($book = mysql_fetch_assoc($rElems)) {
        $ret .= '<tr ><td style="border:1px solid #cccccc;padding:3px;" valign=top nowrap> <a href="profile.php?ID=' . $book['userID'] . '" target="blank">' . ($book['NickName'] != '' ? $book['NickName'] : '') . '</a></td>
		<td style="border:1px solid #cccccc;padding:3px;" valign=top><a href="profile.php?ID=' . $book['voteID'] . '#reviews" target="blank">' . $book['Title'] . '</a></td>
		<td style="border:1px solid #cccccc;padding:3px;" valign=top>' . $book['Text'] . '</td>
		<td style="border:1px solid #cccccc;padding:3px;" valign=top nowrap>' . date("d-m-Y H:i", $book['date']) . '</td>
		<td style="border:1px solid #cccccc;padding:3px;" valign=top>&nbsp;<a href="javascript:if(confirm(\'Delete?\')) top.window.location=\'' . $gConfig['site_url'] . 'admin/reviews.php?del&ID=' . $book['ID'] . (isset($_GET['demo']) ? '&demo=1' : '') . '\';">Del</a></td></tr>';
    }
    $ret .= '</table><br><br>' . $nav;
    return $ret;
}
function letterlist()
{
    global $site;
    $ret = '';
    $iDivis = 20;
    $iCurr = 1;
    if (!isset($_GET['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        $iCurr = (int) $_GET['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sArticlesQuery = "SELECT * from letters order by Time desc ";
    $rArticles = mysql_query($sArticlesQuery);
    $iNums = mysql_num_rows($rArticles);
    $count = (int) ($iNums / $iDivis);
    if ($iNums / $iDivis > (int) ($iNums / $iDivis)) {
        $count++;
    }
    $nav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr, '&perpage=' . $_GET['perpage']) : '';
    $rArticles = mysql_query($sArticlesQuery . $sLimit);
    $ret .= "<a href='{$gConfig['site_url']}admin/subscribe.php?action=create'><b>Create New Letter</b></a><br><br>\r\n\t<table width=100%><tr><td><b>Subject</b></td><td><b>Last Send Date</b></td><td><b>Recipients</b></td><td><b>Status</b></td><td></td></tr>";
    while ($arr = mysql_fetch_assoc($rArticles)) {
        $ret .= "<tr><td><a href='admin/subscribe.php?action=show&ID={$arr['ID']}'>{$arr['Subject']}</a></td><td>" . (intval($arr[Time]) ? date("d-m-Y H:i", $arr[Time]) : 'Never Sended') . "</td>\r\n\t\t<td>" . $arr[Count] . "</td>\r\n\t\t<td>" . ($arr[status] == 0 ? '<b>Draft</b>' : '') . ($arr[status] == 1 ? 'Wait' : '') . ($arr[status] == 3 ? 'Sent' : '') . "</td>\r\n\t\t<td><a href='admin/subscribe.php?action=edit&ID={$arr['ID']}'>Edit</a></td></tr>";
    }
    $ret .= "</table>";
    return $ret;
}
function PageCompViewComments()
{
    global $site;
    global $aFile;
    global $member;
    global $logged;
    $iDivis = 2;
    $iCurr = 1;
    if (!isset($_GET['commPage'])) {
        $sLimit = ' LIMIT 0,' . $iDivis;
    } else {
        $iCurr = (int) $_GET['commPage'];
        $sLimit = ' LIMIT ' . ($iCurr - 1) * $iDivis . ',' . $iDivis;
    }
    $sQuery = "SELECT UNIX_TIMESTAMP(`commDate`) AS `commDate`,\r\n\t\t\t\t\t  `commText`,\r\n\t\t\t\t\t  `profileID`,\r\n\t\t\t\t\t  `Profiles`.`NickName`\r\n\t\t\t\t\t  FROM\r\n\t\t\t\t\t  `shareVideoComments`\r\n\t\t\t\t\t  INNER JOIN `Profiles` ON `Profiles`.`ID`=`shareVideoComments`.`profileID`\r\n\t\t\t\t\t  WHERE `medID`='{$aFile['medID']}' ORDER BY `commDate` DESC";
    $rComments = db_res($sQuery);
    $iNums = mysql_num_rows($rComments);
    $sNav = $iNums > $iDivis ? commentNavigation($iNums, $iDivis, $iCurr) : '';
    $sQuery .= $sLimit;
    $rComments = db_res($sQuery);
    $sCode = '<div id="comments">';
    while ($aComments = mysql_fetch_array($rComments)) {
        $sCode .= '<div class="commentUnit">';
        $sCode .= '<div class="userPic">' . get_member_icon($aComments['profileID'], 'left') . '</div>';
        $sCode .= '<div class="commentMain"><div class="commentInfo"><a href="' . getProfileLink($aComments['profileID']) . '">' . $aComments['NickName'] . '</a> ';
        $sCode .= '(' . defineTimeInterval($aComments['commDate']) . ')</div>';
        $sCode .= '<div class="commentText">' . $aComments['commText'] . '</div></div>';
        $sCode .= '<div class="clear_both"></div>';
        $sCode .= '</div>';
    }
    if ($logged['member']) {
        $sCode .= '<div id="commentArea"><div><a id="commentLink" onClick="document.getElementById(\'answerFormTo\').style.display = \'block\'; 
		this.style.display = \'none\';" href="javascript:void(0);">' . _t("_Post Comment") . '</a>' . '</div>';
        $sCode .= '
			<div id="answerFormTo" style="display:none;">
				<form method="post" id="postForm" action="' . $_SERVER['PHP_SELF'] . '">
					<div>' . _t("_Post Comment") . '</div>
					<div>
						<textarea name="commentText" cols="50" rows="10"></textarea>
					</div>			
					<input type="hidden" name="profileID" value="' . $member['ID'] . '">
					<input type="hidden" name="fileID" value="' . $aFile['medID'] . '">
					<input type="submit" name="commentAdd" value="Post">
					<input type="button" value="Cancel" onClick="
					javascript: document.getElementById(\'answerFormTo\').style.display = \'none\';
					document.getElementById(\'commentLink\').style.display = \'block\'">
				</form>
			</div>
		</div>';
    }
    $sCode .= $sNav;
    $sCode .= '</div>';
    return $sCode;
}
    }
}
if ($profiles != "") {
    $inc_profiles = "profiles={$profiles}&";
} else {
    $inc_profiles = "";
}
$n_arr = mysql_fetch_assoc(mysql_query('SELECT COUNT(*) FROM `Profiles`'));
$status_arr[0] = "Active";
$status_arr[1] = "Approval";
$status_arr[2] = "Unconfirmed";
$status_arr[3] = "Rejected";
$status_arr[4] = "Suspended";
$sQuery = "SELECT *\r\n\t\t\t\t   FROM `Profiles`\r\n\r\n\t\t\t\t   WHERE 1 {$email_part} {$aff_part_w} {$prof_part} {$sex_part} {$sqlWhere} {$sqlGroup} ORDER BY {$sortor} {$sorttype} LIMIT {$real_first_p}, {$p_per_page};";
$result = mysql_query($sQuery);
$nav = commentNavigation($p_num, $p_per_page, $page, $path = '', 'page');
ob_start();
?>
								<center><table cellspacing="1" cellpadding="2" border="0" width="70%" align="center" bgcolor="#cccccc" >
									<tr>
										<td bgcolor="#E5E5E5" class="text" align="left"><a href="admin/profiles.php">Total registered members:</a></td>
										<td bgcolor="#E5E5E5" width="50" class="text" align="right"><b><?php 
echo $n_arr[0];
?>
</b></td>
									</tr>
<?php 
$i = 0;
$iK = 1;
$sActEmColor = " #FFFFFF";
while (list($key, $val) = each($status_arr)) {