示例#1
0
文件: cp.php 项目: abdouh/pets
                            <input id="deactivate_clinics" type="submit" class="button" value="تعطيل" style="background:gray; margin-top:0;">
                            <input id="activate_clinics" type="submit" class="button" value="تفعيل" style="margin-top:0;">
                        </div>
                        <form id="clinics_form">
                            <table dir="rtl">
                                <thead>
                                    <tr>
                                        <th width="40"><input type="checkbox" check="clinics" name="all"></th>
                                        <th width="100">رقم العيادة</th>
                                        <th width="">اسم العيادة</th>
                                        <th width="">الحالة</th>
                                    </tr>
                                </thead>
                                <tbody id="clinics_body">
                                    <?php 
echo empty($clinics) ? '<tr><td colspan="4">لا يوجد عيادات للعرض</td></tr>' : Temp::ad_container_rows($clinics, 2);
?>
                                </tbody>
                            </table>
                        </form>
                        <input type="hidden" name="clinics_page" value="1">
                        <input type="hidden" name="clinics_total" value="<?php 
echo $total_clinics;
?>
">
                        <div id="clinics_more">
                            <?php 
if ($total_clinics > 18) {
    ?>
                                <input id="clinics_button" type="submit" value="المزيد">
                            <?php 
示例#2
0
 public function search_cp()
 {
     if (Login::get_instance()->check_login() == 'valid') {
         $user_data = Register::get_instance()->get_current_user();
         if ($user_data['status'] != 10) {
             exit;
         }
         if ($_POST) {
             if ($_POST['type'] == 'users') {
                 if (is_numeric($_POST['value'])) {
                     $settings['id'] = intval($_POST['value']);
                 } else {
                     if (Validation::email($_POST['value'])) {
                         $settings['email'] = addslashes($_POST['value']);
                     } else {
                         echo '';
                         exit;
                     }
                 }
                 $users = Register::get_instance()->get_user($settings);
                 echo empty($users) ? '' : Temp::users_container_rows($users);
             } else {
                 if ($_POST['type'] == 'ads') {
                     if (is_numeric($_POST['value'])) {
                         $settings['id'] = intval($_POST['value']);
                     } else {
                         $settings['words'] = addslashes($_POST['value']);
                     }
                     if (empty($_POST['value'])) {
                         echo '';
                         exit;
                     }
                     $settings['limit'] = 'no';
                     $ads = ads::load_ads(0, $settings);
                     echo empty($ads) ? '' : Temp::ad_container_rows($ads);
                 } else {
                     if ($_POST['type'] == 'clinics') {
                         if (is_numeric($_POST['value'])) {
                             $settings['id'] = intval($_POST['value']);
                         } else {
                             $settings['words'] = addslashes($_POST['value']);
                         }
                         if (empty($_POST['value'])) {
                             echo '';
                             exit;
                         }
                         $settings['limit'] = 'no';
                         $clinics = ads::load_clinics($settings);
                         echo empty($clinics) ? '' : Temp::ad_container_rows($clinics, 2);
                     }
                 }
             }
         }
     }
 }