Esempio n. 1
0
            $form_action = "modify";
            $form_submit = "Edit";
            print "Please enter your email again for security purposes.";
            include_once "form.php";
            appFooter();
            commonFooter();
            exit;
        } else {
            print "<p><b>Unable to find app #{$app_id} for editing.</b></p>";
        }
    } else {
        if ($action == "list") {
            $email = ereg_replace("'", "", $email);
            $res = mysql_query("SELECT * FROM app WHERE status = 'A' AND submitter = '{$email}' ORDER BY name");
            $num_rows = mysql_num_rows($res);
            if ($res && $num_rows > 0) {
                print "<table border=0 cellpadding=2 cellspacing=0 width=100%>";
                while ($row = mysql_fetch_object($res)) {
                    displayApp($row, $the_cat, $the_subcat, 0, true);
                }
                print "</table>";
            } else {
                print "Unable to find any applications that you submitted.";
            }
        } else {
            print "\n\t\t<form action='edit.php' method=post>\n\t\t\t<input type=hidden name='action' value='list'>\n\n\t\t\tPlease enter your email address.\n\t\t\t<br>\n\t\t\t<br>\n\t\t\t<input type=text name='email'>\n\t\t\t<input type=submit value='Continue'>\n\t\t\t<br>\n\t\t\t<br>\n\t\t\tYour email address will be used to locate applications that you have submitted.\n\t\t</form>\n\t";
        }
    }
}
appFooter();
commonFooter(false);
Esempio n. 2
0
                }
                if ($has_new_screenshot == 'Y') {
                    handleAppImage($_FILES[screenshot][tmp_name], $app_id);
                }
                print "<p><b>Application was edited successfully.</b></p>";
                // email to the list
                mail($mailto, "app '{$app->name}' modified by app editor {$user}", "The following application was modified from this:\n\n" . "-------------------------------------------------\n" . "Name       : {$app_old->name}\n" . "Status     : {$app_old->status}\n" . "Category   : " . $appCats[$app_old->cat_id]->name . "\n" . "Description: {$app_old->blurb}\n" . "\n" . "to this:\n\n" . "-------------------------------------------------\n" . "Name       : {$app->name}\n" . "Status     : {$app->status}\n" . "Category   : " . $appCats[$app->cat_id]->name . "\n" . "Description: {$app->blurb}\n", "From: {$user}@php.net");
            } else {
                print "<p><b><font color='#ff0000'>";
                print "There was a problem editing the application.";
                print "<br>";
                print "Error: (" . mysql_errno() . ") " . mysql_error();
                print "</font></b></p>";
            }
            print "<table border=0 cellpadding=2 cellspacing=0 width=100%>";
            displayApp($app, $the_cat, $the_subcat, $offset);
            print "</table>";
            appFooter();
            commonFooter();
            exit;
            break;
        default:
            if (!empty($action)) {
                print "<p><b><font color='#ff0000'>Error: Didn't understand action '{$action}'.</font></b></p>";
            }
    }
}
if (empty($the_cat) && empty($the_subcat) && empty($key)) {
    include "pending.php";
} else {
    if ($key == "modified") {
Esempio n. 3
0
<?php

//
// this page gets used by administrators to see what apps are pending approval.
//
require_once "apps.inc";
$res = mysql_query("SELECT * FROM app WHERE status = 'P' ORDER BY date_added");
print "<h1>Pending Applications</h1>";
$num_rows = mysql_num_rows($res);
if ($res && $num_rows > 0) {
    print "<table border=0 cellpadding=2 cellspacing=0 width=100%>";
    while ($row = mysql_fetch_object($res)) {
        displayApp($row, 0, 0, 0);
    }
    print "</table>";
} else {
    print "There are no pending applications at this time.";
}
Esempio n. 4
0
if (isset($_POST['rate'])) {
    if ($_POST['rate'] != "all") {
        $sql = $sql . " HAVING rate_avg >= " . $_POST['rate'];
    }
}
$result = mysql_query($sql);
// Application Display
print "<div class = \"table\">";
$i = 0;
$divClosed = 1;
while ($db_field = mysql_fetch_assoc($result)) {
    if ($i == 0) {
        print "<div class = \"row\">";
        $divClosed = 0;
    }
    displayApp($db_field);
    $i++;
    if ($i == 3) {
        print "</div>";
        $divClosed = 1;
        $i = 0;
    }
}
if ($divClosed == 0) {
    print "</div>";
    $divClosed = 1;
    $i = 0;
}
print "</div>";
// AU dessus de la page ... some great app to start with (grosse image clickable)
// Champ de recherche Category / Release Date / Customer Rating / Price / Device / Reset Filters