cvs: php-gtk-web /apps add.php admin-apps.php /include apps.inc
| From: | Philip Hallstrom | Date: | Mon, 25 Mar 2002 23:34:03 +0000 |
| Subject: | cvs: php-gtk-web /apps add.php admin-apps.php /include apps.inc | ||
| Groups: | php.gtk.webmaster | ||
| Request: | Send a blank email to php-gtk-webmaster+get-330@lists.php.net to get a copy of this message | ||
phallstrom Mon Mar 25 18:34:03 2002 EDT
Modified files:
/php-gtk-web/apps add.php admin-apps.php
/php-gtk-web/include apps.inc
Log:
added admin links to "new app" email. added link to screenshot if it
exists. move $mailto to include/apps.inc so it only needs changing in
one spot.
Index: php-gtk-web/apps/add.php
diff -u php-gtk-web/apps/add.php:1.2 php-gtk-web/apps/add.php:1.3
--- php-gtk-web/apps/add.php:1.2 Mon Mar 25 15:07:11 2002
+++ php-gtk-web/apps/add.php Mon Mar 25 18:34:02 2002
@@ -6,11 +6,6 @@
require_once("apps.inc");
-//
-// Change this to whomever you want the administrator emails to go to.
-//
-$mailto = 'gtk-webmaster@php.net';
-
commonHeader('Add an Application', false);
appHeader();
@@ -36,10 +31,14 @@
if( $res == true ) {
+ $app_id = mysql_insert_id();
+
if( $has_screenshot == 'Y' ) {
$app_id = mysql_insert_id();
handleAppImage($_FILES[screenshot][tmp_name], $app_id);
+
+ $screen_shot_link = "Screenshot : http://$_SERVER[SERVER_NAME]/apps/screenshot.php/$app_id.jpg\n";
}
@@ -49,8 +48,17 @@
"URL : $homepage_url\n" .
"Category : " . $appCats[$cat_id]->name . "\n" .
"Submitter : $submitter\n" .
- "Description: $blurb\n",
- "From: $user@php.net");
+ $screen_shot_link .
+ "Description: $blurb\n" .
+ "\n" .
+ "Administrative Actions\n" .
+ "----------------------\n" .
+ "Approve: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=approve&app_id=$app_id\n"
.
+ "Edit: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=edit&app_id=$app_id\n"
.
+ "Reject: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=reject&app_id=$app_id\n"
.
+ "Delete: http://$_SERVER[SERVER_NAME]/apps/admin-apps.php?action=delete&app_id=$app_id\n"
.
+ "",
+ "From: $mailto");
print("Thank you for the submission. Someone will review it shortly.");
}else {
Index: php-gtk-web/apps/admin-apps.php
diff -u php-gtk-web/apps/admin-apps.php:1.1 php-gtk-web/apps/admin-apps.php:1.2
--- php-gtk-web/apps/admin-apps.php:1.1 Fri Mar 22 17:22:30 2002
+++ php-gtk-web/apps/admin-apps.php Mon Mar 25 18:34:03 2002
@@ -8,11 +8,6 @@
require_once("email-validation.inc");
require_once("apps.inc");
-//
-// Change this to whomever you want the administrator emails to go to.
-//
-$mailto = 'gtk-webmaster@php.net';
-
if( isset($MAGIC_COOKIE) ) {
list($user, $pass) = explode(":", base64_decode($MAGIC_COOKIE));
Index: php-gtk-web/include/apps.inc
diff -u php-gtk-web/include/apps.inc:1.2 php-gtk-web/include/apps.inc:1.3
--- php-gtk-web/include/apps.inc:1.2 Fri Mar 22 17:45:47 2002
+++ php-gtk-web/include/apps.inc Mon Mar 25 18:34:03 2002
@@ -6,11 +6,22 @@
mysql_pconnect("localhost","nobody","");
mysql_select_db("gtk");
+//
+// Change this to whomever you want the administrator emails to go to.
+// The commented out values are for phallstrom@php.net's server. Easier
+// to leave them commented out than to change them all the time.
+//
+$mailto = 'gtk-webmaster@php.net';
+//$mailto = 'philip+gtk-webmaster@eilio.com';
+
//
// this directory must exist and must be writable by the user the webserver runs as
+// The commented out values are for phallstrom@php.net's server. Easier
+// to leave them commented out than to change them all the time.
//
define("APP_SCREENSHOT_DIR", "/local/Web/sites/php-gtk-web/apps/screenshots");
+//define("APP_SCREENSHOT_DIR", "/local/www/sites/gtkphp/screenshots");
//
// this is the structure that defines the categories. Just be sure that all of the id numbers are
unique