Beispiel #1
0
 function getBranche()
 {
     $t = new Branches();
     $s = $t->select()->distinct()->from('branche')->join('unite_type', 'unite_type.branche = branche.id', array())->where('unite_type.id = ?', $this->type);
     return $t->fetchOne($s);
 }
 public function getShadowDays()
 {
     if (!Request::ajax()) {
         return "not a json request";
     }
     $data = Input::all();
     if (intval($data['ID']) == 0) {
         $branch = 'MNA';
     } else {
         $branch = Branches::select('BranchID')->where('ID', '=', $data['ID'])->pluck('BranchID');
         $branch = str_replace(['EPL'], [''], $branch);
     }
     $url = str_replace([':FORMAT', ':BRANCH'], ['xml', $branch], API_URL());
     return xmlToJSON($url);
 }