Add files via upload
This commit is contained in:
parent
7b1edde46c
commit
191ead69ef
13 changed files with 1430 additions and 0 deletions
334
removed_stuff/REMOVED_new_market/apps.php
Normal file
334
removed_stuff/REMOVED_new_market/apps.php
Normal file
|
|
@ -0,0 +1,334 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
?>
|
||||
<div class="mrk_search">
|
||||
<input id="search_query" class="mrk_search_input" placeholder="Search Market" onkeypress="search()" onkeyup="search()">
|
||||
</div>
|
||||
<div id="s_results" style="display: none; width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;">
|
||||
<div id="search_results"></div>
|
||||
</div>
|
||||
<div class="market_contain">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="market_title">
|
||||
Top Featured
|
||||
</span> <br>
|
||||
<span class="market_desc">
|
||||
Curated by our content managers.
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<div id="top_featured" onclick="toCat('top_featured')" class="market_vmore">
|
||||
view more
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
// app tray
|
||||
$query = mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='top_featured' ORDER BY promo_tstamp DESC LIMIT 6");
|
||||
$per_row = 3;
|
||||
$app_id = 0;
|
||||
echo "<div style=\"width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;\">";
|
||||
echo "<table class=\"market_table\">";
|
||||
while ($app = mysqli_fetch_assoc($query)) {
|
||||
$app_id = $app_id + 1;
|
||||
if ($app_id % $per_row == 1) {
|
||||
echo "<tr>";
|
||||
}
|
||||
$app_uqid = $app['uqid'];
|
||||
$appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon,developer,price FROM apps WHERE uqid='$app_uqid'");
|
||||
while($ap = mysqli_fetch_assoc($appy)) {
|
||||
$app_uqqid = $ap['uqid'];
|
||||
$app_color = $ap['app_color'];
|
||||
$app_tcolor = $ap['app_titlecolor'];
|
||||
$app_name = $ap['title'];
|
||||
$app_link = $ap['link'];
|
||||
$app_icon = $ap['icon'];
|
||||
$app_dev = $ap['developer'];
|
||||
$app_price = $ap['price'];
|
||||
if($app_price == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price;
|
||||
}
|
||||
}
|
||||
echo "<td style=\"background-color: $app_color; color: $app_tcolor;\">
|
||||
<center>
|
||||
<table style=\"width: 100%; max-width: 100px;\">
|
||||
<tr>
|
||||
<td class=\"mapp\" onclick=\"toApp('$app_uqqid','$app_name')\" style=\"background-image:url('$app_icon'); background-size: 100% 100%; background-color: $app_color;\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class=\"mapp_details\">
|
||||
<span id=\"mapp_nm_$app_uqid\" style=\"font-size: 13px; font-weight: bold;\">$app_name</span>
|
||||
<br>
|
||||
<i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev
|
||||
<br>
|
||||
<table style=\"width: 90%;\">
|
||||
<tr>
|
||||
<td>";
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_uqqid'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
|
||||
$total_num += $ratings;
|
||||
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
echo "</td>
|
||||
<td style=\"text-align: right;\">";
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'")) != 0) {
|
||||
echo "<i onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
echo "<span style=\"font-weight: bold;\">$app_price</span>";
|
||||
}
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</center>
|
||||
</td>";
|
||||
if ($app_id % $per_row == 0)
|
||||
echo "</tr>";
|
||||
}
|
||||
$spacercells = $per_row - ($app_id % $per_row);
|
||||
if ($spacercells < $per_row) {
|
||||
for ($j=1; $j <= $spacercells; $j++) {
|
||||
//"<td></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table></div>";
|
||||
?>
|
||||
|
||||
|
||||
<div class="market_contain">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="market_title">
|
||||
Apps
|
||||
</span> <br>
|
||||
<span class="market_desc">
|
||||
Sorted by most recently added.
|
||||
</span>
|
||||
</td>
|
||||
<td style="text-align: right;">
|
||||
<div id="apps" onclick="toCat('apps')" class="market_vmore">
|
||||
view more
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
// app tray
|
||||
$query = mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='apps' ORDER BY promo_tstamp DESC LIMIT 9");
|
||||
$per_row = 3;
|
||||
$app_id = 0;
|
||||
echo "<div style=\"width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;\">";
|
||||
echo "<table class=\"market_table\">";
|
||||
while ($app = mysqli_fetch_assoc($query)) {
|
||||
$app_id = $app_id + 1;
|
||||
if ($app_id % $per_row == 1) {
|
||||
echo "<tr>";
|
||||
}
|
||||
$app_uqid = $app['uqid'];
|
||||
$appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon,developer,price FROM apps WHERE uqid='$app_uqid'");
|
||||
while($ap = mysqli_fetch_assoc($appy)) {
|
||||
$app_uqqid = $ap['uqid'];
|
||||
$app_color = $ap['app_color'];
|
||||
$app_tcolor = $ap['app_titlecolor'];
|
||||
$app_name = $ap['title'];
|
||||
$app_link = $ap['link'];
|
||||
$app_icon = $ap['icon'];
|
||||
$app_dev = $ap['developer'];
|
||||
$app_price = $ap['price'];
|
||||
if($app_price == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price;
|
||||
}
|
||||
}
|
||||
echo "<td style=\"background-color: $app_color; color: $app_tcolor;\">
|
||||
<center>
|
||||
<table style=\"width: 100%; max-width: 100px;\">
|
||||
<tr>
|
||||
<td class=\"mapp\" onclick=\"toApp('$app_uqqid','$app_name')\" style=\"background-image:url('$app_icon'); background-size: 100% 100%; background-color: $app_color;\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class=\"mapp_details\">
|
||||
<span id=\"mapp_nm_$app_uqid\" style=\"font-size: 13px; font-weight: bold;\">$app_name</span>
|
||||
<br>
|
||||
<i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev
|
||||
<br>
|
||||
<table style=\"width: 90%;\">
|
||||
<tr>
|
||||
<td>";
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_uqqid'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
|
||||
$total_num += $ratings;
|
||||
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
echo "</td>
|
||||
<td style=\"text-align: right;\">";
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'")) != 0) {
|
||||
echo "<i onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
echo "<span style=\"font-weight: bold;\">$app_price</span>";
|
||||
}
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</center>
|
||||
</td>";
|
||||
if ($app_id % $per_row == 0)
|
||||
echo "</tr>";
|
||||
}
|
||||
$spacercells = $per_row - ($app_id % $per_row);
|
||||
if ($spacercells < $per_row) {
|
||||
for ($j=1; $j <= $spacercells; $j++) {
|
||||
//"<td></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table></div>";
|
||||
?>
|
||||
217
removed_stuff/REMOVED_new_market/categories.php
Normal file
217
removed_stuff/REMOVED_new_market/categories.php
Normal file
|
|
@ -0,0 +1,217 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$promo_hkey = safe($_GET['c']);
|
||||
if($promo_hkey == 'top_featured') {
|
||||
$promo_hkey = "top_featured";
|
||||
$promo_title = "Top Featured";
|
||||
$promo_desc = "Curated by our content managers.";
|
||||
}
|
||||
if($promo_hkey == 'apps') {
|
||||
$promo_hkey = "apps";
|
||||
$promo_title = "Apps";
|
||||
$promo_desc = "Sorted by most recently added.";
|
||||
}
|
||||
?>
|
||||
<div class="market_contain">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<span class="market_title">
|
||||
<?php echo $promo_title; ?>
|
||||
</span> <br>
|
||||
<span class="market_desc">
|
||||
<?php echo $promo_desc; ?>
|
||||
</span>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<?php
|
||||
echo "<div id=\"ld_content\">";
|
||||
// app tray
|
||||
$query = mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='$promo_hkey' ORDER BY promo_tstamp DESC LIMIT 12");
|
||||
$app_cnt = mysqli_num_rows(mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='$promo_hkey' ORDER BY promo_tstamp DESC"));
|
||||
$per_row = 3;
|
||||
$app_id = 0;
|
||||
echo "<div style=\"width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;\">";
|
||||
echo "<table class=\"market_table\">";
|
||||
while ($app = mysqli_fetch_assoc($query)) {
|
||||
$app_id = $app_id + 1;
|
||||
if ($app_id % $per_row == 1) {
|
||||
echo "<tr>";
|
||||
}
|
||||
$app_uqid = $app['uqid'];
|
||||
$appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon,developer,price FROM apps WHERE uqid='$app_uqid'");
|
||||
while($ap = mysqli_fetch_assoc($appy)) {
|
||||
$app_uqqid = $ap['uqid'];
|
||||
$app_color = $ap['app_color'];
|
||||
$app_tcolor = $ap['app_titlecolor'];
|
||||
$app_name = $ap['title'];
|
||||
$app_link = $ap['link'];
|
||||
$app_icon = $ap['icon'];
|
||||
$app_dev = $ap['developer'];
|
||||
$app_price = $ap['price'];
|
||||
if($app_price == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price;
|
||||
}
|
||||
}
|
||||
echo "<td style=\"background-color: $app_color; color: $app_tcolor;\">
|
||||
<center>
|
||||
<table style=\"width: 100%; max-width: 100px;\">
|
||||
<tr>
|
||||
<td class=\"mapp\" onclick=\"toApp('$app_uqqid','$app_name')\" style=\"background-image:url('$app_icon'); background-size: 100% 100%; background-color: $app_color;\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class=\"mapp_details\">
|
||||
<span id=\"mapp_nm_$app_uqid\" style=\"font-size: 13px; font-weight: bold;\">$app_name</span>
|
||||
<br>
|
||||
<i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev
|
||||
<br>
|
||||
<table style=\"width: 90%;\">
|
||||
<tr>
|
||||
<td>";
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_uqqid'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
|
||||
$total_num += $ratings;
|
||||
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
echo "</td>
|
||||
<td style=\"text-align: right;\">";
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'")) != 0) {
|
||||
echo "<i onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
echo "<span style=\"font-weight: bold;\">$app_price</span>";
|
||||
}
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</center>
|
||||
</td>";
|
||||
if ($app_id % $per_row == 0)
|
||||
echo "</tr>";
|
||||
}
|
||||
$spacercells = $per_row - ($app_id % $per_row);
|
||||
if ($spacercells < $per_row) {
|
||||
for ($j=1; $j <= $spacercells; $j++) {
|
||||
//"<td></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table></div>";
|
||||
echo "</div>";
|
||||
|
||||
if($app_cnt > 12) {
|
||||
echo "<br><div id=\"more_div\"><table onclick=\"loadmore();\" class=\"mlmore\"><tr><td class=\"mlmore_td\" style=\"text-align: center;\"><i class=\"fa fa-chevron-circle-down fa-lg\" aria-hidden=\"true\"></i></td></tr></table></div>";
|
||||
}
|
||||
?>
|
||||
<input id="amount" type="hidden" value="12">
|
||||
<script>
|
||||
function loadmore() {
|
||||
document.getElementById("more_div").innerHTML = '<div id=\"more_div\"><table class=\"mlmore\"><tr><td class=\"mlmore_td\" style=\"text-align: center;\"><i class=\"fa fa-chevron-circle-down fa-lg\" aria-hidden=\"true\"></i></td></tr></table></div>';
|
||||
var amount = document.getElementById("amount").value;
|
||||
var content = document.getElementById("ld_content");
|
||||
$.ajax({
|
||||
type: 'get',
|
||||
url: 'more_categories.php?c=<?php echo $promo_hkey; ?>',
|
||||
data: {
|
||||
amntcnt:amount
|
||||
},
|
||||
success: function(more_content) {
|
||||
content.innerHTML = content.innerHTML+more_content;
|
||||
document.getElementById("amount").value = Number(amount)+12;
|
||||
}
|
||||
});
|
||||
var getcount = new XMLHttpRequest();
|
||||
getcount.open("GET", "cont_amnt.php?c=<?php echo $promo_hkey; ?>", true);
|
||||
getcount.onreadystatechange = function(){
|
||||
if(getcount.readyState == 4)
|
||||
if(getcount.status == 200) {
|
||||
document.getElementById("more_div").innerHTML = '<div id=\"more_div\"><table onclick=\"loadmore();\" class=\"mlmore\"><tr><td class=\"mlmore_td\" style=\"text-align: center;\"><i class=\"fa fa-chevron-circle-down fa-lg\" aria-hidden=\"true\"></i></td></tr></table></div>';
|
||||
var numCont = getcount.responseText;
|
||||
if(numCont <= Number(amount) + 12) {
|
||||
document.getElementById("more_div").innerHTML = "";
|
||||
}
|
||||
}
|
||||
else{
|
||||
alert("error");
|
||||
document.getElementById("more_div").innerHTML = '<div id=\"more_div\"><table onclick=\"loadmore();\" class=\"mlmore\"><tr><td class=\"mlmore_td\" style=\"text-align: center;\"><i class=\"fa fa-chevron-circle-down fa-lg\" aria-hidden=\"true\"></i></td></tr></table></div>';
|
||||
}
|
||||
};
|
||||
getcount.send();
|
||||
return false;
|
||||
}
|
||||
</script>
|
||||
12
removed_stuff/REMOVED_new_market/cont_amnt.php
Normal file
12
removed_stuff/REMOVED_new_market/cont_amnt.php
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
$promo_hkey = safe($_GET['c']);
|
||||
if($promo_hkey == 'top_featured') {
|
||||
$promo_hkey = "top_featured";
|
||||
}
|
||||
if($promo_hkey == 'apps_and_games') {
|
||||
$promo_hkey = "apps_and_games";
|
||||
}
|
||||
$app_cnt = mysqli_num_rows(mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='$promo_hkey' ORDER BY promo_tstamp DESC"));
|
||||
echo $app_cnt;
|
||||
?>
|
||||
256
removed_stuff/REMOVED_new_market/content.php
Normal file
256
removed_stuff/REMOVED_new_market/content.php
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$app_id = safe($_GET['i']);
|
||||
if($app_id == '') {
|
||||
exit();
|
||||
}
|
||||
$appq = mysqli_query($conx, "SELECT uqid,icon,link,title,app_color,app_titlecolor,description,version,developer,price,category FROM apps WHERE uqid='$app_id'");
|
||||
$appr = mysqli_fetch_assoc($appq);
|
||||
$app_uqid = $appr['uqid'];
|
||||
$app_color = $appr['app_color'];
|
||||
$app_tcolor = $appr['app_titlecolor'];
|
||||
$app_name = $appr['title'];
|
||||
$app_link = $appr['link'];
|
||||
$app_icon = $appr['icon'];
|
||||
$app_dev = $appr['developer'];
|
||||
$app_price_d = $appr['price'];
|
||||
$app_desc = $appr['description'];
|
||||
$app_version = $appr['version'];
|
||||
$app_category = $appr['category'];
|
||||
if($app_price_d == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price_d;
|
||||
}
|
||||
$mrktq = mysqli_query($conx, "SELECT promo_hotkey FROM market WHERE uqid='$app_uqid'");
|
||||
$mrktr = mysqli_fetch_assoc($mrktq);
|
||||
$mrkt_promo_hotkey = $mrktr['promo_hotkey'];
|
||||
?>
|
||||
<?php
|
||||
echo "<div class=\"market_app_contain\" style=\"background-color: $app_color; color: $app_tcolor;\">";
|
||||
echo "<table style=\"width: 100%; text-align: center;\">";
|
||||
echo "<tr>";
|
||||
echo "<td>";
|
||||
echo "<span style=\"font-size: 23px; font-weight: bold;\">$app_name</span>";
|
||||
echo "<br>";
|
||||
echo "<span style=\"font-size: 13px;\"><i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev</span>";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td style=\"text-align: center;\">";
|
||||
echo "<img class=\"mapp_cont_img\" src=\"$app_icon\" alt=\"\" style=\"-webkit-box-shadow: 0 1px 10px -3px #000; width: 100px; height: 100px;\">";
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "<tr>";
|
||||
echo "<td style=\"text-align: right;\">";
|
||||
if($u_cont_mang == 'yes' && $mrkt_promo_hotkey != 'top_featured') {
|
||||
echo " <span id=\"feature_ic\"><i onclick=\"featureApp();\" class=\"fa fa-thumb-tack\" aria-hidden=\"true\"></i></span> ";
|
||||
}
|
||||
if($mrkt_promo_hotkey == 'top_featured') {
|
||||
echo " <i onclick=\"alert('This app has been featured.');\" class=\"fa fa-trophy\" aria-hidden=\"true\"></i> ";
|
||||
}
|
||||
if($app_prchsd = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'")) != 0) {
|
||||
echo "<div onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" style=\"font-size: 14px; color: $app_color; background-color: $app_tcolor; display: inline-block; padding: 4px; font-weight: bold;\"> LAUNCH </div>";
|
||||
}
|
||||
elseif($app_price_d > $u_funds && $app_price_d != 0) {
|
||||
echo "<div style=\"font-size: 14px; color: $app_color; background-color: $app_tcolor; display: inline-block; padding: 4px; font-weight: bold;\"> INSUFFICIENT FUNDS </div>";
|
||||
}
|
||||
else {
|
||||
echo "<div id=\"purchase_btn\" onclick=\"purchase('$app_uqid','$app_price');\" style=\"font-size: 14px; color: $app_color; background-color: $app_tcolor; display: inline-block; padding: 4px; font-weight: bold;\"> $app_price </div>";
|
||||
}
|
||||
echo "</td>";
|
||||
echo "</tr>";
|
||||
echo "</table>";
|
||||
echo "</div>";
|
||||
echo "<div class=\"market_app_contain\" style=\"font-size: 14px; background-color: $app_tcolor; color: $app_color;\">";
|
||||
$string = $app_desc;
|
||||
require_once("../inc/replace.php");
|
||||
echo "$string <br><br>";
|
||||
$app_rated = mysqli_num_rows($asdf = mysqli_query($conx, "SELECT uid,rating FROM market_ratings WHERE app_uqid='$app_uqid' && uid='$u_uid'"));
|
||||
$asdfr = mysqli_fetch_assoc($asdf);
|
||||
$rated_num = $asdfr['rating'];
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_id'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
$total_num += $ratings;
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
$rating_read = round($rating, 1);
|
||||
echo "<center style=\"font-size: 25px;\">$rating_read<br>";
|
||||
if($app_rated == 0 && $app_prchsd != 0) {
|
||||
echo "<span id=\"rater\" style=\"font-size: 11px;\"><i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i> Rate by selecting a star value</span> <br>";
|
||||
echo "<i onclick=\"rateApp('1')\" class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i onclick=\"rateApp('2')\" class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i onclick=\"rateApp('3')\" class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i onclick=\"rateApp('4')\" class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i onclick=\"rateApp('5')\" class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
if($app_prchsd != 0) {
|
||||
echo "<span onclick=\"ratingRemove();\" id=\"rater_r\" style=\"font-size: 11px;\"><i class=\"fa fa-trash\" aria-hidden=\"true\"></i> Remove $rated_num <i class=\"fa fa-star\" aria-hidden=\"true\"></i> rating</span> <br>";
|
||||
}
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
}
|
||||
echo "</center><br>";
|
||||
?>
|
||||
</div>
|
||||
<script>
|
||||
function featureApp() {
|
||||
if(confirm('Feature this app? \n This cannot be undone. \n Also, only perform this action if you truly believe the app deserves special recognition. \n --> Hit the \'enter\' key or select \'ok\' to confirm \n --> Hit the \'escape\' key or select \'cancel\' to abort this action')) {
|
||||
document.getElementById('feature_ic').innerHTML = '<i onclick=\"featureApp();\" class=\"fa fa-spinner\" aria-hidden=\"true\"></i>';
|
||||
var app_uqid = "<?php echo $app_uqid;?>";
|
||||
var token = "<?php echo $u_token;?>";
|
||||
$.ajax({
|
||||
url: 'feature.php',
|
||||
type: 'POST',
|
||||
data: { app_uqid: app_uqid, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
document.getElementById('feature_ic').innerHTML = '<i onclick="alert(\'This app has been featured.\');" class=\"fa fa-trophy\" aria-hidden=\"true\"></i>';
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function ratingRemove() {
|
||||
if(confirm('Remove your rating?')) {
|
||||
document.getElementById('rater_r').innerHTML = document.getElementById('rater_r').innerHTML + '..';
|
||||
var rating_num = '5';
|
||||
var app_uqid = "<?php echo $app_uqid;?>";
|
||||
var token = "<?php echo $u_token;?>";
|
||||
$.ajax({
|
||||
url: 'rate.php?t=r',
|
||||
type: 'POST',
|
||||
data: { app_uqid: app_uqid, token: token, rating_num: rating_num },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
upPage();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function rateApp(rating) {
|
||||
var rating_num = rating;
|
||||
if(rating_num == '1') {
|
||||
var conf_msg = "Rate " + rating_num + " star?";
|
||||
}
|
||||
else {
|
||||
var conf_msg = "Rate " + rating_num + " stars?";
|
||||
}
|
||||
if(confirm(conf_msg)) {
|
||||
document.getElementById('rater').innerHTML = '<i class=\"fa fa-info-circle\" aria-hidden=\"true\"></i> Rate by selecting a star value..';
|
||||
var app_uqid = "<?php echo $app_uqid;?>";
|
||||
var token = "<?php echo $u_token;?>";
|
||||
$.ajax({
|
||||
url: 'rate.php',
|
||||
type: 'POST',
|
||||
data: { app_uqid: app_uqid, token: token, rating_num: rating_num },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
upPage();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function purchase(app_uqid, app_price) {
|
||||
if(confirm("Purchase?")) {
|
||||
document.getElementById('purchase_btn').innerHTML = " " + app_price + ".. ";
|
||||
var token = "<?php echo $u_token;?>";
|
||||
$.ajax({
|
||||
url: 'purchase.php',
|
||||
type: 'POST',
|
||||
data: { app_uqid: app_uqid, token: token },
|
||||
success: function(data){
|
||||
if(data == '') {
|
||||
upPage();
|
||||
}
|
||||
},
|
||||
error: function(data) {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
function upPage(app_uqid) {
|
||||
$.get("content.php?i=<?php echo $app_id; ?>", function(d) {
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
31
removed_stuff/REMOVED_new_market/feature.php
Normal file
31
removed_stuff/REMOVED_new_market/feature.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$p_app_uqid = safe($_POST['app_uqid']);
|
||||
$p_u_token = safe($_POST['token']);
|
||||
// If POSTED token is not equal to the correct user token.
|
||||
if($p_u_token != $u_token) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
// If the POSTED app UQID is invalid.
|
||||
if(mysqli_num_rows($appq = mysqli_query($conx, "SELECT uqid FROM apps WHERE uqid='$p_app_uqid'")) == 0) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
// If user is not a content manager.
|
||||
if($u_cont_mang != 'yes') {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
mysqli_query($conx, "UPDATE market SET promo_hotkey='top_featured' WHERE uqid='$p_app_uqid'");
|
||||
mysqli_query($conx, "UPDATE market SET promo_tstamp='$tstamp' WHERE uqid='$p_app_uqid'");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
|
@ -1 +1,158 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
# # # # # # #
|
||||
# WEBSITE LOCATION #
|
||||
# # # # # # #
|
||||
if($u_siteloc != '/market') {
|
||||
$loc_desc = "shoppin\' in market";
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locdesc='$loc_desc' WHERE uid='$u_uid'");
|
||||
mysqli_query($conx, "UPDATE accounts SET site_locurl='/market' WHERE uid='$u_uid'");
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Market - Misdew</title>
|
||||
<meta charset="utf-8">
|
||||
<meta name="description" content="We are a fairly cool social network.">
|
||||
<meta name="keywords" content="Misdew, MD, Social, Network, Communication, 3DS, DSi, Nintendo">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<meta name="google" value="notranslate">
|
||||
<meta name="theme-color" content="<?php echo $meta_theme_color; ?>">
|
||||
<?php
|
||||
if($css_type == "sheet") {
|
||||
echo "<link rel=\"stylesheet\" type=\"text/css\" href=\"$g_sheet\">";
|
||||
}
|
||||
if($css_type == "raw") {
|
||||
echo "<style type=\"text/css\">$g_raw</style>";
|
||||
}
|
||||
?>
|
||||
<link rel="icon" type="image/png" href="/img/favicon.png">
|
||||
<link rel="apple-touch-icon" href="/img/logo.png">
|
||||
<style type="text/css">
|
||||
body {
|
||||
background-color: <?php echo $bgcolor; ?>;
|
||||
}
|
||||
#header_tds {
|
||||
color: <?php echo $tdcolor; ?> !important;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<center>
|
||||
<?php
|
||||
$back_button = true;
|
||||
$linebreak = false;
|
||||
$alerts = false;
|
||||
require_once("../inc/header.php");
|
||||
?>
|
||||
<div id="action_bar" class="market_actbar">
|
||||
<table style="width: 100%; text-align: center;">
|
||||
<tr>
|
||||
<td id="appsTab" onclick="toApps();" class="action_bar_tab" style="border-bottom: 1px solid <?php echo $cnv_actbar_fc; ?>;">
|
||||
Apps
|
||||
</td>
|
||||
<td id="servicesTab" onclick="toServices();" class="action_bar_tab">
|
||||
Services
|
||||
</td>
|
||||
<td id="merchTab" onclick="toMerch();" class="action_bar_tab">
|
||||
Merch
|
||||
</td>
|
||||
<td id="searchTab" onclick="toSearch()" class="action_bar_tab">
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div> <br>
|
||||
<?php
|
||||
require_once("../inc/load_alerts.php");
|
||||
?>
|
||||
<div id="action_bar_page">
|
||||
<?php require_once("apps.php"); ?>
|
||||
</div>
|
||||
<?php
|
||||
require_once("../inc/footer.php");
|
||||
?>
|
||||
</center>
|
||||
<script>
|
||||
function toApp(app_id, app_name) {
|
||||
var app_name_id = "mapp_nm_" + app_id;
|
||||
document.getElementById(app_name_id).innerHTML = app_name + '..';
|
||||
$.get("content.php?i=" + app_id, function(d) {
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toCat(cat_name) {
|
||||
document.getElementById(cat_name).innerHTML = " view more.. ";
|
||||
$.get("categories.php?c=" + cat_name, function(d) {
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toApps() {
|
||||
document.getElementById('appsTab').innerHTML = "Apps..";
|
||||
$.get("apps.php", function(d) {
|
||||
document.getElementById('appsTab').innerHTML = "Apps";
|
||||
document.getElementById("appsTab").style.borderBottom = '1px solid #fff';
|
||||
document.getElementById("merchTab").style.borderBottom = 'none';
|
||||
document.getElementById("servicesTab").style.borderBottom = 'none';
|
||||
document.getElementById("searchTab").style.borderBottom = 'none';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toServices() {
|
||||
document.getElementById('servicesTab').innerHTML = "Services..";
|
||||
$.get("services.php", function(d) {
|
||||
document.getElementById('servicesTab').innerHTML = "Services";
|
||||
document.getElementById("appsTab").style.borderBottom = 'none';
|
||||
document.getElementById("servicesTab").style.borderBottom = '1px solid #fff';
|
||||
document.getElementById("merchTab").style.borderBottom = 'none';
|
||||
document.getElementById("searchTab").style.borderBottom = 'none';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toMerch() {
|
||||
document.getElementById('merchTab').innerHTML = "Merch..";
|
||||
$.get("merch.php", function(d) {
|
||||
document.getElementById('merchTab').innerHTML = "Merch";
|
||||
document.getElementById("appsTab").style.borderBottom = 'none';
|
||||
document.getElementById("merchTab").style.borderBottom = '1px solid #fff';
|
||||
document.getElementById("servicesTab").style.borderBottom = 'none';
|
||||
document.getElementById("searchTab").style.borderBottom = 'none';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function toSearch() {
|
||||
document.getElementById('searchTab').innerHTML = "Search..";
|
||||
$.get("search.php", function(d) {
|
||||
document.getElementById('searchTab').innerHTML = "Search";
|
||||
document.getElementById("appsTab").style.borderBottom = 'none';
|
||||
document.getElementById("merchTab").style.borderBottom = 'none';
|
||||
document.getElementById("servicesTab").style.borderBottom = 'none';
|
||||
document.getElementById("searchTab").style.borderBottom = '1px solid #fff';
|
||||
$("#action_bar_page").html(d);
|
||||
});
|
||||
}
|
||||
function search() {
|
||||
var searchQ = document.getElementById("search_query");
|
||||
var q = searchQ.value;
|
||||
var q = q.trim();
|
||||
var sb = document.getElementById("s_results");
|
||||
if(q == '') {
|
||||
sb.style.display = 'none';
|
||||
}
|
||||
else {
|
||||
sb.style.display = '';
|
||||
}
|
||||
document.getElementById("search_results").innerHTML = '<div class="market_table"><div style="padding: 8px;"><span class="no_results">searching...</span></div></div>';
|
||||
$.get("search_results.php?q=" + q, function(d) {
|
||||
$("#search_results").html(d);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
16
removed_stuff/REMOVED_new_market/merch.php
Normal file
16
removed_stuff/REMOVED_new_market/merch.php
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<div class="market_table" style="width: 95%; max-width: 500px; font-family: 'Dosis', sans-serif; text-align: left;">
|
||||
<div style="padding: 8px;">
|
||||
<span class="no_results">
|
||||
<span style="font-weight: bold;">Misdew Coins - $7.89</span> <br>
|
||||
These coins are custom made and designed by the owner of Misdew. You will receieve the legacy and evolution versions. A redeemable code for a random amount of Misdew Funds will also be included.<br><br>
|
||||
<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" >
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
<input type="hidden" name="encrypted" value="">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_cart_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
</form>
|
||||
|
||||
<br><div style="font-size: 10px; text-align: center;">payments are processed and handled by PayPal; all sales are final - no returns or refunds <br> orders will usually ship within 1-2 business days</div>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
157
removed_stuff/REMOVED_new_market/more_categories.php
Normal file
157
removed_stuff/REMOVED_new_market/more_categories.php
Normal file
|
|
@ -0,0 +1,157 @@
|
|||
<?php
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$amount = safe($_GET['amntcnt']);
|
||||
$promo_hkey = safe($_GET['c']);
|
||||
if($promo_hkey == 'top_featured') {
|
||||
$promo_hkey = "top_featured";
|
||||
$promo_title = "Top Featured";
|
||||
$promo_desc = "Curated by our content managers.";
|
||||
}
|
||||
if($promo_hkey == 'apps') {
|
||||
$promo_hkey = "apps";
|
||||
$promo_title = "Apps";
|
||||
$promo_desc = "Sorted by most recently added.";
|
||||
}
|
||||
// app tray
|
||||
$query = mysqli_query($conx, "SELECT uqid FROM market WHERE promo_hotkey='$promo_hkey' ORDER BY promo_tstamp DESC LIMIT $amount,12");
|
||||
$per_row = 3;
|
||||
$app_id = 0;
|
||||
echo "<div style=\"width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;\">";
|
||||
echo "<table class=\"market_table\">";
|
||||
while ($app = mysqli_fetch_assoc($query)) {
|
||||
$app_id = $app_id + 1;
|
||||
if ($app_id % $per_row == 1) {
|
||||
echo "<tr>";
|
||||
}
|
||||
$app_uqid = $app['uqid'];
|
||||
$appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon,developer,price FROM apps WHERE uqid='$app_uqid'");
|
||||
while($ap = mysqli_fetch_assoc($appy)) {
|
||||
$app_uqqid = $ap['uqid'];
|
||||
$app_color = $ap['app_color'];
|
||||
$app_tcolor = $ap['app_titlecolor'];
|
||||
$app_name = $ap['title'];
|
||||
$app_link = $ap['link'];
|
||||
$app_icon = $ap['icon'];
|
||||
$app_dev = $ap['developer'];
|
||||
$app_price = $ap['price'];
|
||||
if($app_price == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price;
|
||||
}
|
||||
}
|
||||
echo "<td style=\"background-color: $app_color; color: $app_tcolor;\">
|
||||
<center>
|
||||
<table style=\"width: 100%; max-width: 100px;\">
|
||||
<tr>
|
||||
<td class=\"mapp\" onclick=\"toApp('$app_uqqid','$app_name')\" style=\"background-image:url('$app_icon'); background-size: 100% 100%; background-color: $app_color;\"> </td>
|
||||
</tr>
|
||||
</table>
|
||||
<span class=\"mapp_details\">
|
||||
<span id=\"mapp_nm_$app_uqid\" style=\"font-size: 13px; font-weight: bold;\">$app_name</span>
|
||||
<br>
|
||||
<i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev
|
||||
<br>
|
||||
<table style=\"width: 90%;\">
|
||||
<tr>
|
||||
<td>";
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_uqqid'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
|
||||
$total_num += $ratings;
|
||||
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
echo "</td>
|
||||
<td style=\"text-align: right;\">";
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqid' && uid='$u_uid'")) != 0) {
|
||||
echo "<i onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
echo "<span style=\"font-weight: bold;\">$app_price</span>";
|
||||
}
|
||||
echo "</td>
|
||||
</tr>
|
||||
</table>
|
||||
</span>
|
||||
</center>
|
||||
</td>";
|
||||
if ($app_id % $per_row == 0)
|
||||
echo "</tr>";
|
||||
}
|
||||
$spacercells = $per_row - ($app_id % $per_row);
|
||||
if ($spacercells < $per_row) {
|
||||
for ($j=1; $j <= $spacercells; $j++) {
|
||||
//"<td></td>";
|
||||
}
|
||||
echo "</tr>";
|
||||
}
|
||||
echo "</table></div>";
|
||||
?>
|
||||
53
removed_stuff/REMOVED_new_market/purchase.php
Normal file
53
removed_stuff/REMOVED_new_market/purchase.php
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$p_app_uqid = safe($_POST['app_uqid']);
|
||||
$p_u_token = safe($_POST['token']);
|
||||
// If POSTED token is not equal to the correct user token.
|
||||
if($p_u_token != $u_token) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
// If the POSTED app UQID is invalid.
|
||||
if(mysqli_num_rows($appq = mysqli_query($conx, "SELECT uqid,price,developer FROM apps WHERE uqid='$p_app_uqid'")) == 0) {
|
||||
exit();
|
||||
}
|
||||
// POSTED data has made it through all checks.
|
||||
else {
|
||||
$appr = mysqli_fetch_assoc($appq);
|
||||
$app_uqid = $appr['uqid'];
|
||||
$app_price_d = $appr['price'];
|
||||
$app_dev = $appr['developer'];
|
||||
$devq = mysqli_query($conx, "SELECT uid,funds FROM accounts WHERE username='$app_dev'");
|
||||
$devr = mysqli_fetch_assoc($devq);
|
||||
$app_dev_uid = $devr['uid'];
|
||||
$app_dev_funds = $devr['funds'];
|
||||
if($app_price_d != 0) {
|
||||
if($app_price_d > $u_funds) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
$new_funds = $u_funds - $app_price_d;
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$new_funds' WHERE uid='$u_uid'");
|
||||
// Give the Developer their Fair Share
|
||||
$dev_funds = $app_price_d * ((100-30) / 100);
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$app_dev_funds'+$dev_funds WHERE uid='$app_dev_uid'");
|
||||
// Give Uncle MD its Fair Share
|
||||
$devvq = mysqli_query($conx, "SELECT uid,funds FROM accounts WHERE username='Misdew'");
|
||||
$devvr = mysqli_fetch_assoc($devvq);
|
||||
$app_dev_uidd = $devvr['uid'];
|
||||
$app_dev_fundss = $devvr['funds'];
|
||||
$md_funds = $app_price_d - $dev_funds;
|
||||
mysqli_query($conx, "UPDATE accounts SET funds='$app_dev_fundss'+$md_funds WHERE uid='$app_dev_uidd'");
|
||||
}
|
||||
}
|
||||
$arrange = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE uid='$u_uid'"));
|
||||
$arrange = $arrange + 1;
|
||||
mysqli_query($conx, "INSERT INTO user_apps (arrange,uid,app_uqid) VALUES ('$arrange','$u_uid','$app_uqid')");
|
||||
}
|
||||
}
|
||||
?>
|
||||
46
removed_stuff/REMOVED_new_market/rate.php
Normal file
46
removed_stuff/REMOVED_new_market/rate.php
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$p_remove = safe($_GET['t']);
|
||||
$p_app_uqid = safe($_POST['app_uqid']);
|
||||
$p_u_token = safe($_POST['token']);
|
||||
$p_u_rating = safe($_POST['rating_num']);
|
||||
// If rating is an invalid value.
|
||||
if($p_u_rating == '1' OR $p_u_rating == '2' OR $p_u_rating == '3' OR $p_u_rating == '4' OR $p_u_rating == '5') {
|
||||
}
|
||||
else {
|
||||
exit();
|
||||
}
|
||||
// If POSTED token is not equal to the correct user token.
|
||||
if($p_u_token != $u_token) {
|
||||
exit();
|
||||
}
|
||||
else {
|
||||
$app_prchsd = mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$p_app_uqid' && uid='$u_uid'"));
|
||||
if($app_prchsd != 0) {
|
||||
if($p_remove == 'r') {
|
||||
mysqli_query($conx, "DELETE FROM market_ratings WHERE app_uqid='$p_app_uqid' && uid='$u_uid'");
|
||||
exit();
|
||||
}
|
||||
// If user has already rated app.
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT uid FROM market_ratings WHERE app_uqid='$p_app_uqid' && uid='$u_uid'")) != 0) {
|
||||
exit();
|
||||
}
|
||||
// If the POSTED app UQID is invalid.
|
||||
if(mysqli_num_rows($appq = mysqli_query($conx, "SELECT uqid FROM apps WHERE uqid='$p_app_uqid'")) == 0) {
|
||||
exit();
|
||||
}
|
||||
// POSTED data has made it through all checks.
|
||||
else {
|
||||
$appr = mysqli_fetch_assoc($appq);
|
||||
$app_uqid = $appr['uqid'];
|
||||
mysqli_query($conx, "INSERT INTO market_ratings (uid,app_uqid,rating) VALUES ('$u_uid','$p_app_uqid','$p_u_rating')");
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
24
removed_stuff/REMOVED_new_market/search.php
Normal file
24
removed_stuff/REMOVED_new_market/search.php
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
<div class="mrk_search">
|
||||
<input id="search_query" class="mrk_search_input" placeholder="Search Market" onkeypress="search()" onkeyup="search()">
|
||||
</div>
|
||||
<div id="s_results" style="display: none; width: 95%; max-width: 450px; font-family: 'Dosis', sans-serif;">
|
||||
<div id="search_results"></div>
|
||||
</div>
|
||||
<script>
|
||||
function search() {
|
||||
var searchQ = document.getElementById("search_query");
|
||||
var q = searchQ.value;
|
||||
var q = q.trim();
|
||||
var sb = document.getElementById("s_results");
|
||||
if(q == '') {
|
||||
sb.style.display = 'none';
|
||||
}
|
||||
else {
|
||||
sb.style.display = '';
|
||||
}
|
||||
document.getElementById("search_results").innerHTML = '<div class="market_table"><div style="padding: 8px;"><span class="no_results">searching...</span></div></div>';
|
||||
$.get("search_results.php?q=" + q, function(d) {
|
||||
$("#search_results").html(d);
|
||||
});
|
||||
}
|
||||
</script>
|
||||
120
removed_stuff/REMOVED_new_market/search_results.php
Normal file
120
removed_stuff/REMOVED_new_market/search_results.php
Normal file
|
|
@ -0,0 +1,120 @@
|
|||
<?php
|
||||
$this_page = "market";
|
||||
require_once("../inc/conx.php");
|
||||
if($logged_in == false) {
|
||||
header("location: /");
|
||||
exit();
|
||||
}
|
||||
$q = safe($_GET['q']);
|
||||
|
||||
// app tray
|
||||
echo "<div class=\"market_table\">";
|
||||
$appy = mysqli_query($conx, "SELECT uqid,title,app_color,app_titlecolor,link,icon,developer,price FROM apps WHERE title LIKE '$q%' && discoverable='yes' ORDER BY title");
|
||||
$result_cnt = mysqli_num_rows($appy);
|
||||
if($result_cnt == '0') {
|
||||
echo "<div style=\"padding: 8px;\"><span class=\"no_results\">no results <i class=\"fa fa-frown-o\" aria-hidden=\"true\"></i></span></div>";
|
||||
}
|
||||
while($ap = mysqli_fetch_assoc($appy)) {
|
||||
$app_uqqid = $ap['uqid'];
|
||||
$app_color = $ap['app_color'];
|
||||
$app_tcolor = $ap['app_titlecolor'];
|
||||
$app_name = $ap['title'];
|
||||
$app_link = $ap['link'];
|
||||
$app_icon = $ap['icon'];
|
||||
$app_dev = $ap['developer'];
|
||||
$app_price = $ap['price'];
|
||||
if($app_price == 0) {
|
||||
$app_price = "FREE";
|
||||
}
|
||||
else {
|
||||
$app_price = "$" . $app_price;
|
||||
}
|
||||
echo "<div style=\"background-color: $app_color; color: $app_tcolor; padding: 3px;\"><center>";
|
||||
echo "<table style=\"width: 95%; text-align: left;\"><tr><td style=\"text-align: left;\">";
|
||||
echo "<img src=\"$app_icon\" alt=\"\" style=\"display: block; border: 0; height: 50px; width: 50px; -webkit-box-shadow: 0 1px 10px -3px #000;\">";
|
||||
echo "</td><td style=\"text-align: left; width: 80%;\">";
|
||||
echo " <span style=\"font-weight: bold;\" id=\"mapp_nm_$app_uqqid\">$app_name</span> <br>";
|
||||
echo " <span style=\"font-size: 11px;\"><i class=\"fa fa-code\" aria-hidden=\"true\" style=\"font-weight: bold;\"></i> $app_dev <br>";
|
||||
echo " <span style=\"font-weight: bold;\">";
|
||||
$total_num = 0;
|
||||
$rate_c = mysqli_num_rows($rate_q = mysqli_query($conx, "SELECT rating FROM market_ratings WHERE app_uqid='$app_uqqid'"));
|
||||
while($rate_r = mysqli_fetch_assoc($rate_q)) {
|
||||
$ratings = $rate_r['rating'];
|
||||
|
||||
$total_num += $ratings;
|
||||
|
||||
}
|
||||
$rating = $total_num / $rate_c;
|
||||
$rating_dec = $rating - (int) $rating;
|
||||
$rating_num = floor($rating);
|
||||
if($rating_num == 5) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 4) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 3) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 2) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_num == 1) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec <= .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star-half-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($rating_dec > .5 && $rating_dec != 0) {
|
||||
echo "<i class=\"fa fa-star\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
$left_over = 5 - $rating;
|
||||
$left_over = floor($left_over);
|
||||
if($left_over == 1) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 2) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 3) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 4) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if($left_over == 5) {
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
echo "<i class=\"fa fa-star-o\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
if(mysqli_num_rows(mysqli_query($conx, "SELECT id FROM user_apps WHERE app_uqid='$app_uqqid' && uid='$u_uid'")) != 0) {
|
||||
echo " <i onclick=\"var log_conf=confirm('Open?');if(log_conf == true){window.location='$app_link';}\" class=\"fa fa-check-circle\" aria-hidden=\"true\"></i>";
|
||||
}
|
||||
else {
|
||||
echo " $app_price";
|
||||
}
|
||||
echo "</span></span></td><td style=\"text-align: right;\">";
|
||||
echo " <i onclick=\"toApp('$app_uqqid','$app_name');\" class=\"fa fa-external-link-square\" aria-hidden=\"true\"></i>";
|
||||
echo "</td></tr></table>";
|
||||
echo "</center></div>";
|
||||
}
|
||||
echo "</div>";
|
||||
?>
|
||||
7
removed_stuff/REMOVED_new_market/services.php
Normal file
7
removed_stuff/REMOVED_new_market/services.php
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<div class="market_table" style="width: 95%; max-width: 500px; font-family: 'Dosis', sans-serif; text-align: left;">
|
||||
<div style="padding: 8px;">
|
||||
<span class="no_results">
|
||||
We currently do not have any services.
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue