예제 #1
0
echo $CERCA['TEXT'];
?>
" style="width: 500px;" />
            </div>
        </div>                
        <div style="clear:both; float: left;">
            <div style="margin: 5px;">            
                <b>Qui?</b><br /><?php 
echo select_tag('cerca[SITE]', options_for_select(ActivitatsPeer::selectSitesActivitats($CERCA['TEXT']), $CERCA['SITE'][0]), array('multiple' => 'multiple', 'style' => 'height:130px; width:360px;', 'id' => 'E_ON'));
?>
            </div>
        </div>
        <div style="float: left;">
            <div style="margin: 5px;">            
                <b>Quan?</b><br /><?php 
echo select_tag('cerca[DATA]', options_for_select(ActivitatsPeer::selectDatesActivitats(null, null, $CERCA['TEXT'], $CERCA['SITE'][0]), $CERCA['DATA'][0]), array('multiple' => 'multiple', 'style' => 'height:130px; width:180px;', 'id' => 'DATAE'));
?>
            </div>
        </div>
        <div style="clear:both; float: left;">
            <div id="RANGE" style="float: left; margin-right:5px; margin-top:4px;">
                Des de: <input type="text" id="DIE" name="cerca[DATA_R][DI]" style="height:30px; width:100px;" />
                Fins a: <input type="text" id="DFE" name="cerca[DATA_R][DF]" style="height:30px; width:100px;" />
            </div>
            
            <div style="float: left; margin-right:5px; margin-top:4px;">
                <input type="hidden" name="cerca[P]" value="1" style="height:30px; width:100px;" />                                                
            </div>
        </div>
        
        <div style="float: right; margin-right:5px; margin-top:4px;">
예제 #2
0
                <b>On?</b><br /><?php 
echo select_tag('cerca[POBLE]', options_for_select(CursosPeer::selectPoblesCursos($CERCA['TEXT']), $CERCA['POBLE'][0]), array('multiple' => 'multiple', 'style' => 'height:130px; width:180px;', 'id' => 'R_ON'));
?>
            </div>
        </div>
        <div style="float: left;">
            <div style="margin: 5px;">            
                <b>Què?</b><br /><?php 
echo select_tag('cerca[CATEGORIA]', options_for_select(CursosPeer::selectCategoriesCursos($CERCA['POBLE'][0], $CERCA['TEXT']), $CERCA['CATEGORIA'][0]), array('multiple' => 'multiple', 'style' => 'height:130px; width:180px;', 'id' => 'R_CAT'));
?>
            </div>
        </div>
        <div style="float: left;">
            <div style="margin: 5px;">            
                <b>Quan?</b><br /><?php 
echo select_tag('cerca[DATA]', options_for_select(ActivitatsPeer::selectDatesActivitats($CERCA['POBLE'][0], $CERCA['CATEGORIA'][0], $CERCA['TEXT']), $CERCA['DATA'][0]), array('multiple' => 'multiple', 'style' => 'height:130px; width:180px;', 'id' => 'R_DATA'));
?>
            </div>
        </div>
        <div style="clear:both; float: left; width:400px;">
            <div id="RANG" style="float: left; margin-right:5px; margin-top:4px;">
                Des de: <input type="text" id="DI" name="cerca[DATA_R][DI]" style="height:30px; width:100px;" />
                Fins a: <input type="text" id="DF" name="cerca[DATA_R][DF]" style="height:30px; width:100px;" />
            </div>                        
            
            <div style="float: left; margin-right:5px; margin-top:4px;">
                <input type="hidden" name="cerca[P]" value="1" style="height:30px; width:100px;" />                                                
            </div>
        </div>
        
        <div style="float: right; margin-right:5px; margin-top:4px;">
예제 #3
0
 /**
  * Realitza totes les consultes AJAX D'activitats
  * */
 public function executeAjaxACT(sfWebRequest $request)
 {
     $accio = $request->getParameter('ACCIO');
     switch ($accio) {
         case 'POB_ON':
             $C = new Criteria();
             $text = $request->getParameter('TEXT');
             $idP = $request->getParameter('ON');
             $sel = $request->getParameter('SEL');
             $R = ActivitatsPeer::selectCategoriesActivitats($idP[0], $text);
             break;
         case 'POB_QUAN':
             $C = new Criteria();
             $idP = $request->getParameter('ON');
             $idC = $request->getParameter('CAT');
             $sel = $request->getParameter('SEL');
             $text = $request->getParameter('TEXT');
             $R = ActivitatsPeer::selectDatesActivitats($idP[0], $idC[0], $text, null);
             break;
         case 'ENT_QUAN':
             $C = new Criteria();
             $idE = $request->getParameter('ENT');
             $sel = $request->getParameter('SEL');
             $text = $request->getParameter('TEXT');
             $R = ActivitatsPeer::selectDatesActivitats(null, null, $text, $idE[0]);
             break;
     }
     $RET = "";
     foreach ($R as $K => $E) {
         $SELECTED = $sel == $K ? "SELECTED" : "";
         $RET .= '<option ' . $SELECTED . ' value="' . $K . '">' . $E . '</option>';
     }
     return $this->renderText($RET);
 }