Codeigniter - Holat hali yaratilganda faqat tahrirlashga yoki yo'q qilishga ruxsat berish

Vaziyat rad etilgan yoki tasdiqlansa, tugmachani tahrirlash va o'chirish qanday o'chiriladi? Shunday qilib, foydalanuvchi faqat statusni hali tasdiqlash uchun yuborilgan taqdirda, Requisiton-ni tahrirlashi mumkin.

screen

Bu mening ko'rinish :

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                    
                    
                </div>
              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Controller :

$perpage = 20;
$params = array(0, 0, 0);
$pagination = array(
    'base_url' => base_url("item_requisition/index"),
    'total_rows' => sizeof($this->call_sp("view_item_requisition", $params)),
    'per_page' => $perpage,
    'num_links' => 3,
    'uri_segment' => 3
);
$params = array($perpage, $offset, 0);

$this->data['requisition_list'] = $this->call_sp("view_item_requisition", $params);
$this->data['pagination'] = $this->paging($pagination);
$this->render($this->data, "index");
1
statusni rad etish yoki tasdiqlash vaqtida ko'rsatilmasligi kerak bo'lgan html kodidan oldin: <? PHP if ($ l-> STATUS_NAME == 'rad etilgan' || $ l-> STATUS_NAME == 'tasdiqlangan'):? > <? PHP endif qo'shgandan keyin; ?>
qo'shib qo'ydi muallif Dan Ionescu, manba
statusni rad etish yoki tasdiqlash vaqtida ko'rsatilmasligi kerak bo'lgan html kodidan oldin: <? PHP if ($ l-> STATUS_NAME == 'rad etilgan' || $ l-> STATUS_NAME == 'tasdiqlangan'):? > <? PHP endif qo'shgandan keyin; ?>
qo'shib qo'ydi muallif Dan Ionescu, manba

10 javoblar

Agar ular ushbu maqomlarda hech qachon mavjud bo'lmasalar, ularni yaratib bo'lmagani uchun ularni olib tashlang ...

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved'): ?>
                    
                    
                <?php endif;>
                </div>
              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Divslarni tark etsangiz, sizning uslubingiz bilan aralashmaslik kerak, lekin u erda o'ynash kerakmi, yo'qmi, yo'qmi, buni ko'rish uchun o'ynang.

0
qo'shib qo'ydi

Agar ular ushbu maqomlarda hech qachon mavjud bo'lmasalar, ularni yaratib bo'lmagani uchun ularni olib tashlang ...

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved'): ?>
                    
                    
                <?php endif;>
                </div>
              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Divslarni tark etsangiz, sizning uslubingiz bilan aralashmaslik kerak, lekin u erda o'ynash kerakmi, yo'qmi, yo'qmi, buni ko'rish uchun o'ynang.

0
qo'shib qo'ydi

Agar ular ushbu maqomlarda hech qachon mavjud bo'lmasalar, ularni yaratib bo'lmagani uchun ularni olib tashlang ...

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved'): ?>
                    
                    
                <?php endif;>
                </div>
              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Divslarni tark etsangiz, sizning uslubingiz bilan aralashmaslik kerak, lekin u erda o'ynash kerakmi, yo'qmi, yo'qmi, buni ko'rish uchun o'ynang.

0
qo'shib qo'ydi

Siz tugmalarni yashirish yoki ularni o'chirishga qaror qilishingiz mumkin. Ularni o'chirib tashlashga qaror qilsangiz, tekshirgichingizda tekshiruvni amalga oshiring

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

<tbody>
  <?php 
    $counter=1+intval($this->uri->segment(3));
    foreach($requisition_list as $l){ 
  ?>
    <tr>
      <td>
        
      </td>
      <td><?= $counter ?></td>
      <td><?= $l->KD_REQUISITION ?></td>
      <td><?= $l->STATUS_NAME ?></td>      
      <td class="center">
      <?php

       if ($l->STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved') {
         $disabled = 'disabled="disabled"'
       }
       
      ?>
        <div class="visible-md visible-lg hidden-sm hidden-xs">
            
            
        </div>
      </td>
    </tr>
  <?php 
    $counter++;
    }
  ?>
</tbody>
</div> </div>
0
qo'shib qo'ydi
o'chirib qo'yilmasligi kodni kodni o'zgartirishni to'xtatib qo'yadi va uni hali bosish kerak ...
qo'shib qo'ydi muallif Brian Ramsey, manba

Siz tugmalarni yashirish yoki ularni o'chirishga qaror qilishingiz mumkin. Ularni o'chirib tashlashga qaror qilsangiz, tekshirgichingizda tekshiruvni amalga oshiring

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

<tbody>
  <?php 
    $counter=1+intval($this->uri->segment(3));
    foreach($requisition_list as $l){ 
  ?>
    <tr>
      <td>
        
      </td>
      <td><?= $counter ?></td>
      <td><?= $l->KD_REQUISITION ?></td>
      <td><?= $l->STATUS_NAME ?></td>      
      <td class="center">
      <?php

       if ($l->STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved') {
         $disabled = 'disabled="disabled"'
       }
       
      ?>
        <div class="visible-md visible-lg hidden-sm hidden-xs">
            
            
        </div>
      </td>
    </tr>
  <?php 
    $counter++;
    }
  ?>
</tbody>
</div> </div>
0
qo'shib qo'ydi
o'chirib qo'yilmasligi kodni kodni o'zgartirishni to'xtatib qo'yadi va uni hali bosish kerak ...
qo'shib qo'ydi muallif Brian Ramsey, manba

Siz tugmalarni yashirish yoki ularni o'chirishga qaror qilishingiz mumkin. Ularni o'chirib tashlashga qaror qilsangiz, tekshirgichingizda tekshiruvni amalga oshiring

<div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false"> <div class="snippet-code">

<tbody>
  <?php 
    $counter=1+intval($this->uri->segment(3));
    foreach($requisition_list as $l){ 
  ?>
    <tr>
      <td>
        
      </td>
      <td><?= $counter ?></td>
      <td><?= $l->KD_REQUISITION ?></td>
      <td><?= $l->STATUS_NAME ?></td>      
      <td class="center">
      <?php

       if ($l->STATUS_NAME == 'declined' || $l->STATUS_NAME == 'approved') {
         $disabled = 'disabled="disabled"'
       }
       
      ?>
        <div class="visible-md visible-lg hidden-sm hidden-xs">
            
            
        </div>
      </td>
    </tr>
  <?php 
    $counter++;
    }
  ?>
</tbody>
</div> </div>
0
qo'shib qo'ydi
o'chirib qo'yilmasligi kodni kodni o'zgartirishni to'xtatib qo'yadi va uni hali bosish kerak ...
qo'shib qo'ydi muallif Brian Ramsey, manba

Menimcha $ _ SESSION ['aprouved'] va foydalanuvchi jadvaliga mos keladigan ma'lumotlar bazasi qiymatini yaratishingiz mumkin. O'zingiz xohlagan narsangiz yo'q. Ushbu sessiya konfiguratsiyasidan foydalaning va uni xavfsiz holga keltiring.

ini_set('session.use_trans_sid', 0);
ini_set('session.use_strict_mode', 1);
ini_set('session.use_cookie', 1);
ini_set('session.use_only_cookie', 1);
ini_set('session.use_only_cookie', 0);
0
qo'shib qo'ydi

Javob uchun rahmat. Ushbu kodni mening shartim uchun ishlataman:

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->NAMA_UNIT ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                <?php if ($l->STATUS_NAME == 'Sent for Approval'): ?>
                    
                    
                <?php endif;?>
                </div>

              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Foydalanuvchiga hali id ​​idorasi tomonidan tartibga solinishi mumkin bo'lsa-da, hech bo'lmaganda tasdiqlangan/rad etilgan maqom uchun tekshiruvgichda shart qo'yishim kerak.

0
qo'shib qo'ydi

Javob uchun rahmat. Ushbu kodni mening shartim uchun ishlataman:

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->NAMA_UNIT ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                <?php if ($l->STATUS_NAME == 'Sent for Approval'): ?>
                    
                    
                <?php endif;?>
                </div>

              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Foydalanuvchiga hali id ​​idorasi tomonidan tartibga solinishi mumkin bo'lsa-da, hech bo'lmaganda tasdiqlangan/rad etilgan maqom uchun tekshiruvgichda shart qo'yishim kerak.

0
qo'shib qo'ydi

Javob uchun rahmat. Ushbu kodni mening shartim uchun ishlataman:

<tbody>
          <?php 
            $counter=1+intval($this->uri->segment(3));
            foreach($requisition_list as $l){ 
          ?>
            <tr>
              <td>
                
              </td>
              <td><?= $counter ?></td>
              <td><?= $l->KD_REQUISITION ?></td>
              <td><?= $l->NAMA_UNIT ?></td>
              <td><?= $l->STATUS_NAME ?></td>
              <td class="center">
                <div class="visible-md visible-lg hidden-sm hidden-xs">
                <?php if ($l->STATUS_NAME == 'Sent for Approval'): ?>
                    
                    
                <?php endif;?>
                </div>

              </td>
            </tr>
          <?php 
            $counter++;
            }
          ?>
        </tbody>

Foydalanuvchiga hali id ​​idorasi tomonidan tartibga solinishi mumkin bo'lsa-da, hech bo'lmaganda tasdiqlangan/rad etilgan maqom uchun tekshiruvgichda shart qo'yishim kerak.

0
qo'shib qo'ydi
PhP |BotsUz
PhP |BotsUz
93 ishtirokchilar

Phpni o'rganishni Hohlasangiz https://t.me/joinchat/AAAAAE-KRc5dd5tPMmGmWA A'zo bo'lin