Exemple #1
0
         if ($last_user_avatar == '0') {
             $last_reply_avatar = '<img class="img-centre img-rounded" src="https://cravatar.eu/avatar/' . $user->IdToMCName($item->topic_last_user) . '/30.png" />';
         } else {
             $last_reply_avatar = '<img class="img-centre img-rounded" style="width:30px; height:30px;" src="' . $user->getAvatar($item->topic_last_user, "../") . '" />';
         }
     }
     $sticky_template_array[] = array('topic_id' => $item->id, 'topic_title' => htmlspecialchars($item->topic_title), 'topic_poster' => htmlspecialchars($user->idToName($item->topic_creator)), 'topic_poster_mcname' => htmlspecialchars($user->idToMCName($item->topic_creator)), 'topic_created_rough' => $timeago->inWords(date('d M Y, H:i', $item->topic_date), $time_language), 'topic_created' => date('d M Y, H:i', $item->topic_date), 'last_reply_avatar' => $last_reply_avatar, 'last_reply_username' => htmlspecialchars($user->idToName($item->topic_last_user)), 'last_reply_mcname' => htmlspecialchars($user->idToMCName($item->topic_last_user)), 'last_post_rough' => $timeago->inWords(date('d M Y, H:i', $item->topic_reply_date), $time_language), 'last_post_created' => date('d M Y, H:i', $item->topic_reply_date), 'views' => $item->topic_views, 'posts' => $replies, 'locked' => $item->locked);
 }
 // Latest discussions
 // PAGINATION
 // Set current page and number of records
 $pagination->setCurrent($p);
 $pagination->setTotal(count($topics));
 $pagination->alwaysShowPagination();
 // Get number of topics we should display on the page
 $paginate = PaginateArray($p);
 $n = $paginate[0];
 $f = $paginate[1];
 // Get the number we need to finish on ($d)
 if (count($topics) > $f) {
     $d = $p * 10;
 } else {
     $d = count($topics) - $n;
     $d = $d + $n;
 }
 // Get a list of all topics from the forum, and paginate
 while ($n < $d) {
     // Get number of replies to a topic
     $replies = $queries->getWhere("posts", array("topic_id", "=", $topics[$n]->id));
     $replies = count($replies);
     // Get avatar of user who last posted
Exemple #2
0
                 $model = 'modelCsv';
             }
         }
     }
 }
 /* Create Array */
 if ($model != 'modelCsv') {
     $fList = explode($separator, $f);
 }
 $fTotal = count($fList);
 $fTotalPhase = number_format($fTotal / $LETHE_IMP_LOAD_PAGE, 2);
 $progPer = percentage($page, $fTotalPhase, 2);
 $sourceLimit = calcSource(set_org_id, 'subscribers');
 $sourceCntTemp = $sourceLimit;
 /* Current Pos */
 $page_arr = PaginateArray($fList, $page, $LETHE_IMP_LOAD_PAGE);
 $imp = $myconn->prepare("INSERT INTO \n\t\t\t\t\t\t\t\t\t\t\t" . db_table_pref . "subscribers \n\t\t\t\t\t\t\t\t\t SET\n\t\t\t\t\t\t\t\t\t\t\tOID=" . set_org_id . ",\n\t\t\t\t\t\t\t\t\t\t\tGID=" . $impGrp . ",\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_name=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_mail=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_web=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_date=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_phone=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_company=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_active=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_verify=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_key=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_full_data=?,\n\t\t\t\t\t\t\t\t\t\t\tadd_date=?,\n\t\t\t\t\t\t\t\t\t\t\tsubscriber_verify_key=?\n\t\t\t\t\t\t\t\t\t ") or die(mysqli_error($myconn));
 /* Mail Checker */
 $mailChk = $myconn->prepare("SELECT ID FROM " . db_table_pref . "subscribers WHERE OID=" . set_org_id . " AND subscriber_mail=?") or die(mysqli_error($myconn));
 $mailBLChk = $myconn->prepare("SELECT ID FROM " . db_table_pref . "blacklist WHERE OID=" . set_org_id . " AND email=?") or die(mysqli_error($myconn));
 # Data Loop
 foreach ($page_arr as $k => $v) {
     # Limit Control
     if (!limitBlock($sourceCntTemp, set_org_max_subscriber)) {
         $progPer = 100;
         $limitExceeded = letheglobal_limit_exceeded;
         break;
     }
     # Test Mode
     /* 	$isActive = rand(0,1);
     	$isVerfiy = rand(0,2);