]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/surfbar_functions.php
Surfbar extended (dummy), user list now displays total points, locked points, click...
[mailer.git] / inc / libs / surfbar_functions.php
index a7471a6a537c8e172776dadab981157091ba32eb..e235ce19cbab6d757e6c18abaa248044bef81720 100644 (file)
@@ -903,6 +903,33 @@ GROUP BY sbu.id", __FILE__, __LINE__);
        // Return value
        return $maxRand;
 }
+// Load all URLs of the current user and return it as an array
+function SURFBAR_GET_USER_URLS () {
+       // Init array
+       $URLs = array();
+
+       // Begin the query
+       $result = SQL_QUERY_ESC("SELECT u.id, u.url, u.views_total, u.status, UNIX_TIMESTAMP(u.registered) AS registered, UNIX_TIMESTAMP(u.last_locked) AS last_locked, u.lock_reason AS lock_reason
+FROM "._MYSQL_PREFIX."_surfbar_urls AS u
+WHERE u.userid=%s
+ORDER BY u.id ASC",
+               array($GLOBALS['userid']), __FILE__, __LINE__);
+
+       // Are there entries?
+       if (SQL_NUMROWS($result) > 0) {
+               // Load all rows
+               while ($row = SQL_FETCHARRAY($result)) {
+                       // Add the row
+                       $URLs[$row['id']] = $row;
+               } // END - while
+       } // END - if
+
+       // Free result
+       SQL_FREERESULT($result);
+
+       // Return the array
+       return $URLs;
+}
 // Determine next id for surfbar or get data for given id, always call this before you call other
 // getters below this function!!!
 function SURFBAR_DETERMINE_NEXT_ID ($id = 0) {