X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=0.2.1%2Finc%2Fmodules%2Fadmin%2Fwhat-list_links.php;h=a72ee9b5b358705f2f1263c12ba491f180f52e1b;hb=7bc25dd08431c94ce9edca131d56c1a36b13c28a;hp=b8bc605a199ce42c712b023ccff4d9b65224c990;hpb=157ee010917df5ca07e6d31b42f67417b2516d74;p=mailer.git
diff --git a/0.2.1/inc/modules/admin/what-list_links.php b/0.2.1/inc/modules/admin/what-list_links.php
index b8bc605a19..a72ee9b5b3 100644
--- a/0.2.1/inc/modules/admin/what-list_links.php
+++ b/0.2.1/inc/modules/admin/what-list_links.php
@@ -1,179 +1,179 @@
- 0)
- {
- // Some unconfirmed mails left
- if ($_GET['del'] == "all")
- {
- // Delete all unconfirmed mails by this user
- $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%d LIMIT %s",
- array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__);
-
- // Prepare mail and send it away
- $msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval($_GET['u_id']));
- SEND_EMAIL($email, ADMIN_DEL_LINK_SUBJ, $msg);
-
- // Display message
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_LINKS_DELETED);
- }
- else
- {
- // List all unconfirmed mails
- $SW = 2; $OUT = "";
- while (list($id, $id2, $type) = SQL_FETCHROW($result))
- {
- // Load data from stats table...
- $cat = "";
- switch ($type)
- {
- case "NORMAL":
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%d LIMIT 1",
- array(bigintval($id)), __FILE__, __LINE__);
- $TYPE = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM;
- $LINK = "".$id."";
- break;
-
- case "BONUS":
- $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM "._MYSQL_PREFIX."_bonus WHERE id=%d LIMIT 1",
- array(bigintval($id2)), __FILE__, __LINE__);
- $TYPE = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM;
- $LINK = "".$id2."";
- break;
- }
-
- if (SQL_NUMROWS($result_data) == 1)
- {
- // Mail was found!
- list($subject, $timestamp, $cat) = SQL_FETCHROW($result_data);
- SQL_FREERESULT($result_data);
- if (empty($subject)) $subject = DEFAULT_SUBJECT_LINE;
-
- // Prepare data for the row template
- $content = array(
- 'sw' => $SW,
- 'link' => $LINK,
- 'subj' => $subject,
- 'stamp' => MAKE_DATETIME($timestamp, "0"),
- 'cat' => GET_CATEGORY($cat),
- );
-
- // Load row template
- $OUT .= LOAD_TEMPLATE("admin_list_links_row", true, $content);
- }
- else
- {
- $OUT .= "
-
- ".$PROBLEM.": ".$DATA."
- |
-
\n";
- }
- $SW = 3 - $SW;
- }
-
- // Free memory
- SQL_FREERESULT($result);
-
- // Remember list in constant for the template
- define('__SNAME_VALUE', $sname);
- define('__FNAME_VALUE', $fname);
- define('__EMAIL_VALUE', "".$email."");
- define('__EMAIL_LIST' , $OUT);
- define('__NUMS_VALUE' , $nums);
- define('__UID_VALUE' , $_GET['u_id']);
-
- // Load final template
- LOAD_TEMPLATE("admin_list_links");
- }
- }
- else
- {
- // No mails left to confirm
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_LINKS_1.$_GET['u_id'].ADMIN_MEMBER_LINKS_2);
- }
- }
- else
- {
- // User not found
- LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2);
- }
-}
- else
-{
- // Output selection form with all confirmed user accounts listed
- ADD_MEMBER_SELECTION_BOX();
-}
-CLOSE_TABLE();
-
-//
-?>
+ 0)
+ {
+ // Some unconfirmed mails left
+ if ($_GET['del'] == "all")
+ {
+ // Delete all unconfirmed mails by this user
+ $result_del = SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM "._MYSQL_PREFIX."_user_links WHERE userid=%d LIMIT %s",
+ array(bigintval($_GET['u_id']), $nums), __FILE__, __LINE__);
+
+ // Prepare mail and send it away
+ $msg = LOAD_EMAIL_TEMPLATE("admin-del_links", $nums, bigintval($_GET['u_id']));
+ SEND_EMAIL($email, ADMIN_DEL_LINK_SUBJ, $msg);
+
+ // Display message
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_LINKS_DELETED);
+ }
+ else
+ {
+ // List all unconfirmed mails
+ $SW = 2; $OUT = "";
+ while (list($id, $id2, $type) = SQL_FETCHROW($result))
+ {
+ // Load data from stats table...
+ $cat = "";
+ switch ($type)
+ {
+ case "NORMAL":
+ $result_data = SQL_QUERY_ESC("SELECT subject, timestamp_ordered, cat_id FROM "._MYSQL_PREFIX."_user_stats WHERE id=%d LIMIT 1",
+ array(bigintval($id)), __FILE__, __LINE__);
+ $TYPE = "mailid"; $DATA = $id; $PROBLEM = NORMAL_MAIL_PROBLEM;
+ $LINK = "".$id."";
+ break;
+
+ case "BONUS":
+ $result_data = SQL_QUERY_ESC("SELECT subject, timestamp, cat_id FROM "._MYSQL_PREFIX."_bonus WHERE id=%d LIMIT 1",
+ array(bigintval($id2)), __FILE__, __LINE__);
+ $TYPE = "bonusid"; $DATA = $id2; $PROBLEM = BONUS_MAIL_PROBLEM;
+ $LINK = "".$id2."";
+ break;
+ }
+
+ if (SQL_NUMROWS($result_data) == 1)
+ {
+ // Mail was found!
+ list($subject, $timestamp, $cat) = SQL_FETCHROW($result_data);
+ SQL_FREERESULT($result_data);
+ if (empty($subject)) $subject = DEFAULT_SUBJECT_LINE;
+
+ // Prepare data for the row template
+ $content = array(
+ 'sw' => $SW,
+ 'link' => $LINK,
+ 'subj' => $subject,
+ 'stamp' => MAKE_DATETIME($timestamp, "0"),
+ 'cat' => GET_CATEGORY($cat),
+ );
+
+ // Load row template
+ $OUT .= LOAD_TEMPLATE("admin_list_links_row", true, $content);
+ }
+ else
+ {
+ $OUT .= "
+
+ ".$PROBLEM.": ".$DATA."
+ |
+
\n";
+ }
+ $SW = 3 - $SW;
+ }
+
+ // Free memory
+ SQL_FREERESULT($result);
+
+ // Remember list in constant for the template
+ define('__SNAME_VALUE', $sname);
+ define('__FNAME_VALUE', $fname);
+ define('__EMAIL_VALUE', "".$email."");
+ define('__EMAIL_LIST' , $OUT);
+ define('__NUMS_VALUE' , $nums);
+ define('__UID_VALUE' , $_GET['u_id']);
+
+ // Load final template
+ LOAD_TEMPLATE("admin_list_links");
+ }
+ }
+ else
+ {
+ // No mails left to confirm
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_LINKS_1.$_GET['u_id'].ADMIN_MEMBER_LINKS_2);
+ }
+ }
+ else
+ {
+ // User not found
+ LOAD_TEMPLATE("admin_settings_saved", false, ADMIN_MEMBER_404_1.$_GET['u_id'].ADMIN_MEMBER_404_2);
+ }
+}
+ else
+{
+ // Output selection form with all confirmed user accounts listed
+ ADD_MEMBER_SELECTION_BOX();
+}
+CLOSE_TABLE();
+
+//
+?>