Beispiel #1
0
 }
 if (isset($rowcount)) {
     $q->start_row = $startingwith;
     $q->row_count = $rowcount;
 }
 // When we hit that page a second time, the array named
 // by $base will be set and we must generate the $query.
 // Ah, and don\'t set $base to "q" when $q is your Sql_Query
 // object... :-)
 if (isset($x)) {
     $query = $q->where("x", 1);
 }
 if (!$query) {
     $query = "id!='0'";
 }
 $db->query("SELECT COUNT(*) as total from SmsLog where " . $query);
 $db->next_record();
 if ($db->f("total") < $q->start_row - $q->row_count) {
     $q->start_row = $db->f("total") - $q->row_count;
 }
 if ($q->start_row < 0) {
     $q->start_row = 0;
 }
 if (!$sortorder) {
     $sortorder = "id";
 }
 $query .= " Order By " . $sortorder . " LIMIT " . $q->start_row . "," . $q->row_count;
 // In any case we must display that form now. Note that the
 // "x" here and in the call to $q->where must match.
 // Tag everything as a CSS "query" class.
 printf($q->form("x", $t->map_cols, "query"));
 }
 if (isset($rowcount)) {
     $q->start_row = $startingwith;
     $q->row_count = $rowcount;
 }
 // When we hit that page a second time, the array named
 // by $base will be set and we must generate the $query.
 // Ah, and don\'t set $base to "q" when $q is your Sql_Query
 // object... :-)
 if (isset($x)) {
     $query = $q->where("x", 1);
 }
 if (!$query) {
     $query = "id!='0'";
 }
 $db->query("SELECT COUNT(*) as total from SmsAddressBook where " . $query);
 $db->next_record();
 if ($db->f("total") < $q->start_row - $q->row_count) {
     $q->start_row = $db->f("total") - $q->row_count;
 }
 if ($q->start_row < 0) {
     $q->start_row = 0;
 }
 if (!$sortorder) {
     $sortorder = "id";
 }
 $query .= " Order By " . $sortorder . " LIMIT " . $q->start_row . "," . $q->row_count;
 // In any case we must display that form now. Note that the
 // "x" here and in the call to $q->where must match.
 // Tag everything as a CSS "query" class.
 printf($q->form("x", $t->map_cols, "query"));
Beispiel #3
0
 if (isset($auth)) {
     if (!$f->validate($result)) {
         $cmd = $submit;
         echo "<font class=bigTextBold>{$cmd} Sms Address Book</font>\n";
         $f->display();
         page_close();
         exit;
     } else {
         $mysms = new sms();
         if ($mysms->session) {
             $Charge = $mysms->checkCoverage($CountryCode . $AreaCode . $Number);
         }
         echo "Saving....";
         $f->save_values();
         $count = 0;
         $db->query("select distinct Country from SmsCoverage where CountryCode='" . $CountryCode . "'");
         echo "<b>Done!</b><br><table><tr><td><b>Carriers in ";
         while ($db->next_record()) {
             if ($count) {
                 echo ", ";
             }
             echo $db->f("Country");
             $count++;
         }
         $MobileNumber = $CountryCode . $AreaCode . $Number;
         echo "&nbsp;&nbsp;</b></td><td><b>Credits Used Per SMS Message</b></td></tr>\n";
         $db->query("select * from SmsCoverage where CountryCode='" . $CountryCode . "'");
         while ($db->next_record()) {
             printf("<tr><td>%s</td><td>%s</td></tr>\n", $db->f("Carrier"), $db->f("Cost"));
         }
         echo "</table><br><a href=\"" . $sess->self_url() . "\">Back to SmsAddressBook.</a><br>\n";
Beispiel #4
0
 if (isset($auth)) {
     if (!$f->validate($result)) {
         $cmd = $submit;
         echo "<font class=bigTextBold>{$cmd} Sms Address Book</font>\n";
         $f->display();
         page_close();
         exit;
     } else {
         $mysms = new sms();
         if ($mysms->session) {
             $Charge = $mysms->checkCoverage($CountryCode . $AreaCode . $Number);
         }
         echo "Saving....";
         $f->save_values();
         $count = 0;
         $db->query("select distinct Country from SmsCoverage where CountryCode='" . $CountryCode . "'");
         echo "<b>Done!</b><br><table><tr><td><b>Carriers in ";
         while ($db->next_record()) {
             if ($count) {
                 echo ", ";
             }
             echo $db->f("Country");
             $count++;
         }
         $MobileNumber = $CountryCode . $AreaCode . $Number;
         echo "&nbsp;&nbsp;</b></td><td><b>Credits Used Per SMS Message</b></td></tr>\n";
         $db->query("select * from SmsCoverage where CountryCode='" . $CountryCode . "'");
         while ($db->next_record()) {
             printf("<tr><td>%s</td><td>%s</td></tr>\n", $db->f("Carrier"), $db->f("Cost"));
         }
         echo "</table><br><a href=\"" . $sess->self_url() . "\">Back to SmsAddressBook.</a><br>\n";