Location: PHPKode > projects > MembersGear > membersgear/templates/admin_search_user.tpl
{$ADMIN_HEADER}
{php}
 require_once INCLUDE_DIR."/datepicker/class/class.oCalendarPicker.php";

     $aMonthNames=array(
         "FR"=>array("Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"),
         "EN"=>array("January","February","March","April","May","June","July","August","September","October","November","December")
     );
     $aDaysNames=array(
         "FR"=>array("Lundi", "Mardi", "Mercredi", "Jeudi", "Vendredi", "Samedi", "Dimanche"),
         "EN"=>array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday")
    );
     $sDateFormat=array(
         "FR"=>"m/d/Y",
         //"EN"=>"m/d/Y"
         "EN"=>"Y/m/d"
    );
    
    $sDate=(!empty($_GET['sDate']))?$_GET['sDate']:date("Ymd");

{/php}
 <div id="content" class="setdiv" style="overflow:visible;">
  {if $msg neq ''}
            <div class="succmsg" style="width:250px">{$msg}</div>
           {/if} 

     <div id="full-contentdiv">
          <div class="righttop">
                <h2>
                   <center>
                          Search user
                   </center>
                </h2>                                      
            </div>
            <div class="whole-page clear">
               <div class="formformat">
                    <form name="frmSearchUserMet1" method="post" action="admin_search_user.php?action=search">      
                      <table border="0" cellpadding="0" cellspacing="0"  width="80%" align="center" style="position:relative">    
                          <tbody>
                          
                             <tr>
                                 <td class="right-side-text" width="30%"><label>Search String<label class="star">*</label></label></td>
                                 <td class="left-side-text" width="40%">
                                        <input type="text" name="User_search"  id="User_search"  class="txtcss"  size="30"><br>
                                 </td>
                             </tr>
                             <tr>
                                 <td class="right-side-text" width="30%"><label>Search by</label></td>
                                 <td class="left-side-text" width="40%">
                                        
                                        <input type="radio" class="chkcss" checked="checked" value="anywhere" name="q_where"/>
                                        <b>Anywhere</b>
                                        <br/>
                                        <input type="radio" class="chkcss" value="byUsername" name="q_where"/>
                                        By Username
                                        <br/>
                                        <input type="radio" class="chkcss" value="byFullname" name="q_where"/>
                                        By Name
                                        <br/>
                                        <input type="radio" class="chkcss" value="byemail" name="q_where"/>
                                        By Email  
                                 </td>
                             </tr>
                             <tr>
                                 <td class="right-side-text" width="30%">&nbsp;</td>
                                  <td class="left-side-text" width="40%">
                                  <input type="hidden" id="search_method1" name="search_method1" value="clicked">
                                  <input type="submit" id="method1" name="method1" class="btncss" value="Search">
                                  </td>
                             </tr>
                  </form>
                  <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  </tr>
                 
                 <form name="frmSearchUserMet2" method="post" action="admin_search_user.php?action=search">
                 
                              <tr>
                                 <td class="right-side-text" width="30%"><label>Search by Subscriptions<label class="star">*</label></label></td>
                                 <td class="left-side-text" width="40%">
                                       <table class="borderless">
                                          <tr>
                                          <td>
                                          <select size="1" name="product_id" class="selectcss">
                                              <option value="" selected>Select.</option>
                                                 {foreach from=$products key=k item=prod}
                                                <option value="{$k}" label="{$prod}">{$prod}</option>
                                                {/foreach}  
                                          </select>&nbsp;
                                          </td>
                                          </tr>
                                          <tr>
                                          <td>
                                              <select size="1" name="subscription" class="selectcss">
                                                    <option value="all" label="All" selected>All Subscriptions</option>
                                                    <option value="active" label="active">Active subscriptions</option>
                                                    <option value="expired" label="expired">Expired subscriptions</option>
                                              </select>
                                          </td>
                                          </tr>
                                         </table> 
                                          
                                 </td>
                             </tr>
                             
                             <tr>
                                 <td class="right-side-text" width="30%">&nbsp;</td>
                                  <td class="left-side-text" width="40%">
                                  <input type="hidden" id="search_method2" name="search_method2" value="clicked">
                                  <input  type="submit" id="method2" name="method2" class="btncss" value="Search">
                                  </td>
                             </tr>
                             
                 </form> 
                  <tr>
                  <td>&nbsp;</td>
                  <td>&nbsp;</td>
                  </tr>
                  <form name="frmSearchUserMet3" method="post" action="admin_search_user.php?action=search">
                           <tr>
                                 <td class="right-side-text" width="30%"><label>Search Type</label></td>
                                 <td class="left-side-text" width="40%">
                                       <select size="1" name="search_type" class="selectcss">
                                            <option value="begin_date_before">Subscribed before specified date
                                            </option><option value="begin_date">Subscribed exactly on specified date        
                                            </option><option value="begin_date_after">Subscribed after specified date        
                                            </option><option value="expire_date_before">Subscription expires before specified date
                                            </option><option value="expire_date">Subscription expires on specified date        
                                            </option><option value="expire_date_after">Subscription expires after specified date        
                                           </option>
                                     </select>
                                 </td>                                                          
                             </tr>
                     <tr>
                                 <td class="right-side-text" width="30%"><label>Search by Date<label class="star">*</label></label></td>
                                 <td class="left-side-text" width="40%">
                                        <input type="text" name="search_date"  style="width:100px" id="search_date" readonly class="txtcss" >
                                         <input type="button" value='' style='background:url({$ADMIN_IMAGE_DIR}/calendar1.gif) no-repeat;height:20px;width:21px;border:0px;'   onclick="displayCalendar(document.forms[2].search_date,'yyyy/mm/dd',this)">
                                     
                                      {*  {php}
                                                     $aCalendarParams=array(
                                                     "sIconPath"     =>  ADMIN_IMAGE_DIR."/calendar1.gif",
                                                     "iAction"       =>  1,   //0=>reloadCurrentPage with get param sDate, 1=>fill field sFieldName
                                                     "sFieldName"    =>  "search_date",
                                                     "iStyle"        =>  1,   //0=>display calendar, 1=>display div on icon click
                                                     "aMonthNames"   =>  $aMonthNames["EN"],
                                                     "aDaysNames"    =>  $aDaysNames["EN"],
                                                     "sDateFormat"   =>  $sDateFormat["EN"]
                                                     );
                                                     new oCalendarPicker("calFixe1",$sDate,$aCalendarParams);
                                                 {/php} *}
                                 </td>
                             </tr>
                  
                               <tr>
                                 <td class="right-side-text" width="30%">&nbsp;&nbsp;</td>
                                  <td class="left-side-text" width="40%">
                                   <input type="hidden" id="search_method3" name="search_method3" value="clicked">  
                                   <input class="btncss" id="method3" name="method3" type="submit" value="Search">
                                  </td>
                             </tr>    
                  </form>
               
               </tbody>
           </table>            
            </div>
    </div>
</div>
</div>
{literal}
 <script language="JavaScript" type="text/javascript">
              var frmvalidator  = new Validator("frmSearchUserMet1");
              frmvalidator.EnableMsgsTogether();
              frmvalidator.addValidation("User_search","req","Please enter Search string.");
              
               var frmvalidator1  = new Validator("frmSearchUserMet2");
              frmvalidator1.EnableMsgsTogether();
              frmvalidator1.addValidation("product_id","dontselect=''","Please select product.");
              var frmvalidator2  = new Validator("frmSearchUserMet3");
              frmvalidator2.addValidation("search_date","req","Please select date.");
 </script>
 {/literal}

 {$ADMIN_FOOTER} 
Return current item: MembersGear