Advertisement
Guest User

Untitled

a guest
Jun 21st, 2012
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.10 KB | None | 0 0
  1. <?php break;?>
  2. <?php case"add":?>
  3. <?php if($user->userlevel == 5): print Filter::msgInfo(lang('PROJ_NOPERM'), false); return; endif;?>
  4. <?php $ptype = $content->getProjectTypes();?>
  5. <?php $userlist = $user->getUserList(1);?>
  6. <?php $marcalist = $content->getMarca();?>
  7. <?php $tipoapp = $content->getTipoApp();?>
  8.  
  9. <script language="javascript" type="text/javascript">
  10. // Roshan's Ajax dropdown code with php
  11. // This notice must stay intact for legal use
  12. // Copyright reserved to Roshan Bhattarai - [email protected]
  13. // If you have any problem contact me at http://roshanbh.com.np
  14. function getXMLHTTP() { //fuction to return the xml http object
  15.         var xmlhttp=false; 
  16.         try{
  17.             xmlhttp=new XMLHttpRequest();
  18.         }
  19.         catch(e)    {      
  20.             try{           
  21.                 xmlhttp= new ActiveXObject("Microsoft.XMLHTTP");
  22.             }
  23.             catch(e){
  24.                 try{
  25.                 xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
  26.                 }
  27.                 catch(e1){
  28.                     xmlhttp=false;
  29.                 }
  30.             }
  31.         }
  32.            
  33.         return xmlhttp;
  34.     }
  35.    
  36.     function getState(client_id) {     
  37.        
  38.         var strURL="apparecchiodrop.php?="+client_id;
  39.         var req = getXMLHTTP();
  40.        
  41.         if (req) {
  42.            
  43.             req.onreadystatechange = function() {
  44.                 if (req.readyState == 4) {
  45.                     // only if "OK"
  46.                     if (req.status == 200) {                       
  47.                         document.getElementById('statediv').innerHTML=req.responseText;                    
  48.                     } else {
  49.                         alert("There was a problem while using XMLHTTP:\n" + req.statusText);
  50.                     }
  51.                 }              
  52.             }          
  53.             req.open("GET", strURL, true);
  54.             req.send(null);
  55.         }      
  56.     }
  57. </script>
  58. <h1><img src="../images/projects.png" alt="" /><?php echo lang('PROJ_TITLE1');?></h1>
  59. <p class="info"><?php echo lang('PROJ_INFO1') . lang('REQFIELD1') . required() . lang('REQFIELD2');?></p>
  60. <div class="block-border">
  61.   <div class="block-content">
  62.     <form action="" method="post" id="admin_form" name="admin_form">
  63.       <table cellspacing="0" cellpadding="0" class="forms">
  64.         <thead>
  65.           <tr>
  66.             <th colspan="2" class="left"><?php echo lang('PROJ_SUB1');?></th>
  67.           </tr>
  68.         </thead>
  69.         <tr>
  70.        
  71.         <tr>
  72.           <th><?php echo lang('INVC_CNAME');?>: <?php echo required();?></th>
  73.           <td><select name="client_id" class="custombox" style="width:250px" onChange="getState(this.value)">
  74.               <option value="">--- <?php echo lang('INVC_CLIENTSELECT');?> ---</option>
  75.               <?php if($userlist):?>
  76.               <?php foreach ($userlist as $crow):?>
  77.               <option value="<?php echo $crow->id;?>"><?php echo $crow->name;?></option>
  78.               <?php endforeach;?>
  79.               <?php unset($crow);?>
  80.               <?php endif;?>
  81.             </select>
  82.     <a href="index.php?do=clients-rip&action=add"><img src="../images/client-overview.png" alt="" class="tooltip img-wrap2" title="<?php echo lang('PROJ_ADDCLIENTE');?>"/></a>
  83.             </td>
  84.         </tr>
  85.        
  86.      
  87.   <tr>
  88.    <th><?php echo lang('INVC_CNAME');?>: <?php echo required();?></th>
  89.    <select name="apparecchio" class="custombox" style="width:250px">
  90.     <td><div  id="statediv"><select name="state" >
  91.     <option>Seleziona prima il Cliente</option>
  92.         </select></div></td>
  93.   </tr>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement