Ejemplo n.º 1
0
     $rowcount = mysqli_num_rows($result2);
     if ($rowcount > 0) {
         $executive[$row['received']] = $row2['name'];
         $received_name[$row['received']] = $executive[$row['received']];
     } else {
         $executive[$row['received']] = "";
         $received_name[$row['received']] = $row['received'];
     }
 }
 $table .= "<td>" . $executive[$row['received']] . "</td>";
 for ($a = 0; $a < count($select_list); $a++) {
     if ($select_list[$a] == 'account_type') {
         $table .= "<td>" . ucwords(str_replace("_", " ", $row['account_type'])) . "</td>";
     } else {
         if ($select_list[$a] == 'date_sent') {
             $table .= "<td>" . convert_to_dateTime($row['date_sent']) . "</td>";
         } else {
             if ($select_list[$a] == 'date_created') {
                 $date = "";
                 if ($row['date_created'] != '') {
                     $date = date("F j, Y", strtotime($row['date_created']));
                 }
                 $table .= "<td style='text-align:center  '>" . $date . "</td>";
             } else {
                 $table .= "<td style='text-align:center'>" . $row[$select_list[$a]] . "</td>";
             }
         }
     }
 }
 $table .= "<td>";
 if (!empty($access['Hide'])) {
Ejemplo n.º 2
0
 $result = $conn->query($select);
 if ($result->num_rows > 0) {
     echo "<td style='vertical-align:top'>";
     echo "<h2>SMS List</h2>";
     echo "<table  style='border-collapse:collapse'>";
     echo "<tbody style='border:1px solid black;display:block;height:400px;overflow:auto;min-width:300px'>";
     $a = 0;
     while ($row = $result->fetch_assoc()) {
         // echo "<tr><th>".$row['received']."</th></tr>";
         //  echo "<tr><th style='width:60px;padding-left:10px;padding-top:8px;padding-bottom:10px;text-align:left'>Sender</th>   <td style='padding-left:10px;padding-top:8px;padding-bottom:10px;text-align:left'>".$row['received']."</th></tr>";
         echo "<tr  id='sms_row" . $a . "'  style='vertical-align: middle;display:block' name='sms_row" . $a . "'>";
         echo "<td style='width:60px;padding-left:10px;padding-top:8px;padding-bottom:10px;text-align:right;vertical-align: middle;'>\n                            <input type='checkbox' id='sms_id{$a}' name='sms_id[] ' value='" . $row['sms_id'] . "' style='text-align:right;width:50px;height:30px' ></td>";
         echo "<td style='padding-left:5px;border:1px solid black;min-width:250px;min-height:190px;vertical-align: middle;'>" . $row['sms'] . "</td>";
         echo "</tr>";
         echo "<tr id='sms_row" . $a . "' name='sms_row" . $a . "'>";
         echo "<td colspan=2 style='padding-left:10px;text-align:left'>" . convert_to_dateTime($row['date_sent']);
         echo "<input type='button' style='border:none;background-color:transparent;margin:10px;textdecoration:underliner;' onclick='hide_this({$a})' value='Hide'>";
         echo "</td>";
         echo "</tr>";
         $a++;
     }
     //  echo "<input type='hidden' id='num' name='num' value='$a'>";
     echo "</tbody>";
     echo "<tr>";
     echo "<td colspan=2 style='text-align:center'><input type='hidden' id='num' name='num' value='{$a}'>\n                        <input style='width:100px;padding:5px;height:20px' type='submit' name='match_submit' value='Match' ></td>";
     echo "</tr>";
     echo "</table>";
     echo "</td>";
 } else {
     echo "<td><h2>No Data Found</h2></td>";
 }