>false; } //************************** // Detects if the current browser is based on WebKit. function DetectWebkit() { if (stripos($this->useragent, $this->engineWebKit) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is the Nokia S60 Open Source Browser. function DetectS60OssBrowser() { //First, test for WebKit, then make sure it's either Symbian or S60. if ($this->DetectWebkit() == $this->true) { if (stripos($this->useragent, $this->deviceSymbian) > -1 || stripos($this->useragent, $this->deviceS60) > -1) { return $this->true; } else return $this->false; } else return $this->false; } //************************** // Detects if the current device is any Symbian OS-based device, // including older S60, Series 70, Series 80, Series 90, and UIQ, // or other browsers running on these devices. function DetectSymbianOS() { if (stripos($this->useragent, $this->deviceSymbian) > -1 || stripos($this->useragent, $this->deviceS60) > -1 || stripos($this->useragent, $this->deviceS70) > -1 || stripos($this->useragent, $this->deviceS80) > -1 || stripos($this->useragent, $this->deviceS90) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a // Windows Phone 7 device. function DetectWindowsPhone7() { if (stripos($this->useragent, $this->deviceWinPhone7) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a Windows Mobile device. // Excludes Windows Phone 7 devices. // Focuses on Windows Mobile 6.xx and earlier. function DetectWindowsMobile() { if ($this->DetectWindowsPhone7() == $this->true) return $this->false; //Most devices use 'Windows CE', but some report 'iemobile' // and some older ones report as 'PIE' for Pocket IE. if (stripos($this->useragent, $this->deviceWinMob) > -1 || stripos($this->useragent, $this->deviceIeMob) > -1 || stripos($this->useragent, $this->enginePie) > -1) return $this->true; //Test for Windows Mobile PPC but not old Macintosh PowerPC. if (stripos($this->useragent, $this->devicePpc) > -1 && !(stripos($this->useragent, $this->deviceMacPpc) > 1)) return $this->true; //Test for certain Windwos Mobile-based HTC devices. if (stripos($this->useragent, $this->manuHtc) > -1 && stripos($this->useragent, $this->deviceWindows) > -1) return $this->true; if ($this->DetectWapWml() == $this->true && stripos($this->useragent, $this->deviceWindows) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is any BlackBerry device. // Includes the PlayBook. function DetectBlackBerry() { if ((stripos($this->useragent, $this->deviceBB) > -1) || (stripos($this->httpaccept, $this->vndRIM) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is on a BlackBerry tablet device. // Examples: PlayBook function DetectBlackBerryTablet() { if ((stripos($this->useragent, $this->deviceBBPlaybook) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a BlackBerry phone device AND uses a // WebKit-based browser. These are signatures for the new BlackBerry OS 6. // Examples: Torch. Includes the Playbook. function DetectBlackBerryWebKit() { if (($this->DetectBlackBerry() == $this->true) && ($this->DetectWebkit() == $this->true)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a BlackBerry Touch phone device with // a large screen, such as the Storm, Torch, and Bold Touch. Excludes the Playbook. function DetectBlackBerryTouch() { if ((stripos($this->useragent, $this->deviceBBStorm) > -1) || (stripos($this->useragent, $this->deviceBBTorch) > -1) || (stripos($this->useragent, $this->deviceBBBoldTouch) > -1) || (stripos($this->useragent, $this->deviceBBCurveTouch) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a BlackBerry OS 5 device AND // has a more capable recent browser. Excludes the Playbook. // Examples, Storm, Bold, Tour, Curve2 // Excludes the new BlackBerry OS 6 and 7 browser!! function DetectBlackBerryHigh() { //Disambiguate for BlackBerry OS 6 or 7 (WebKit) browser if ($this->DetectBlackBerryWebKit() == $this->true) return $this->false; if ($this->DetectBlackBerry() == $this->true) { if (($this->DetectBlackBerryTouch() == $this->true) || stripos($this->useragent, $this->deviceBBBold) > -1 || stripos($this->useragent, $this->deviceBBTour) > -1 || stripos($this->useragent, $this->deviceBBCurve) > -1) { return $this->true; } else return $this->false; } else return $this->false; } //************************** // Detects if the current browser is a BlackBerry device AND // has an older, less capable browser. // Examples: Pearl, 8800, Curve1. function DetectBlackBerryLow() { if ($this->DetectBlackBerry() == $this->true) { //Assume that if it's not in the High tier, then it's Low. if (($this->DetectBlackBerryHigh() == $this->true) || ($this->DetectBlackBerryWebKit() == $this->true)) return $this->false; else return $this->true; } else return $this->false; } //************************** // Detects if the current browser is on a PalmOS device. function DetectPalmOS() { //Most devices nowadays report as 'Palm', but some older ones reported as Blazer or Xiino. if (stripos($this->useragent, $this->devicePalm) > -1 || stripos($this->useragent, $this->engineBlazer) > -1 || stripos($this->useragent, $this->engineXiino) > -1) { //Make sure it's not WebOS first if ($this->DetectPalmWebOS() == $this->true) return $this->false; else return $this->true; } else return $this->false; } //************************** // Detects if the current browser is on a Palm device // running the new WebOS. function DetectPalmWebOS() { if (stripos($this->useragent, $this->deviceWebOS) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is on an HP tablet running WebOS. function DetectWebOSTablet() { if ((stripos($this->useragent, $this->deviceWebOShp) > -1) && (stripos($this->useragent, $this->deviceTablet) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a // Garmin Nuvifone. function DetectGarminNuvifone() { if (stripos($this->useragent, $this->deviceNuvifone) > -1) return $this->true; else return $this->false; } //************************** // Check to see whether the device is any device // in the 'smartphone' category. function DetectSmartphone() { global $isIphone, $isAndroidPhone, $isTierIphone; if (($this->isIphone == $this->true) || ($this->isAndroidPhone == $this->true) || ($this->isTierIphone == $this->true) || ($this->DetectS60OssBrowser() == $this->true) || ($this->DetectSymbianOS() == $this->true) || ($this->DetectWindowsMobile() == $this->true) || ($this->DetectWindowsPhone7() == $this->true) || ($this->DetectBlackBerry() == $this->true) || ($this->DetectPalmWebOS() == $this->true) || ($this->DetectPalmOS() == $this->true) || ($this->DetectGarminNuvifone() == $this->true)) return $this->true; else return $this->false; } //************************** // Detects whether the device is a Brew-powered device. function DetectBrewDevice() { if (stripos($this->useragent, $this->deviceBrew) > -1) return $this->true; else return $this->false; } //************************** // Detects the Danger Hiptop device. function DetectDangerHiptop() { if (stripos($this->useragent, $this->deviceDanger) > -1 || stripos($this->useragent, $this->deviceHiptop) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is Opera Mobile or Mini. function DetectOperaMobile() { if (stripos($this->useragent, $this->engineOpera) > -1) { if ((stripos($this->useragent, $this->mini) > -1) || (stripos($this->useragent, $this->mobi) > -1)) return $this->true; else return $this->false; } else return $this->false; } //************************** // Detects if the current browser is Opera Mobile // running on an Android phone. function DetectOperaAndroidPhone() { if ((stripos($this->useragent, $this->engineOpera) > -1) && (stripos($this->useragent, $this->deviceAndroid) > -1) && (stripos($this->useragent, $this->mobi) > -1)) return $this->true; else return $this->false; } //************************** // Detects if the current browser is Opera Mobile // running on an Android tablet. function DetectOperaAndroidTablet() { if ((stripos($this->useragent, $this->engineOpera) > -1) && (stripos($this->useragent, $this->deviceAndroid) > -1) && (stripos($this->useragent, $this->deviceTablet) > -1)) return $this->true; else return $this->false; } //************************** // Detects whether the device supports WAP or WML. function DetectWapWml() { if (stripos($this->httpaccept, $this->vndwap) > -1 || stripos($this->httpaccept, $this->wml) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is an Amazon Kindle (eInk devices only). // Note: For the Kindle Fire, use the normal Android methods. function DetectKindle() { if (stripos($this->useragent, $this->deviceKindle) > -1 && $this->DetectAndroid() == $this->false) return $this->true; else return $this->false; } //************************** // Detects if the current Amazon device is using the Silk Browser. // Note: Typically used by the the Kindle Fire. function DetectAmazonSilk() { if (stripos($this->useragent, $this->engineSilk) > -1) return $this->true; else return $this->false; } //************************** // The quick way to detect for a mobile device. // Will probably detect most recent/current mid-tier Feature Phones // as well as smartphone-class devices. Excludes Apple iPads and other modern tablets. function DetectMobileQuick() { //Let's exclude tablets if ($this->isTierTablet == $this->true) return $this->false; //Most mobile browsing is done on smartphones if ($this->DetectSmartphone() == $this->true) return $this->true; if (($this->DetectWapWml() == $this->true) || ($this->DetectBrewDevice() == $this->true) || ($this->DetectOperaMobile() == $this->true)) return $this->true; if ((stripos($this->useragent, $this->engineNetfront) > -1) || (stripos($this->useragent, $this->engineUpBrowser) > -1) || (stripos($this->useragent, $this->engineOpenWeb) > -1)) return $this->true; if (($this->DetectDangerHiptop() == $this->true) || ($this->DetectMidpCapable() == $this->true) || ($this->DetectMaemoTablet() == $this->true) || ($this->DetectArchos() == $this->true)) return $this->true; if ((stripos($this->useragent, $this->devicePda) > -1) && !(stripos($this->useragent, $this->disUpdate) > -1)) return $this->true; if (stripos($this->useragent, $this->mobile) > -1) return $this->true; //We also look for Kindle devices if ($this->DetectKindle() == $this->true || $this->DetectAmazonSilk() == $this->true) return $this->true; else return $this->false; } //************************** // Detects if the current device is a Sony Playstation. function DetectSonyPlaystation() { if (stripos($this->useragent, $this->devicePlaystation) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is a Nintendo game device. function DetectNintendo() { if (stripos($this->useragent, $this->deviceNintendo) > -1 || stripos($this->useragent, $this->deviceWii) > -1 || stripos($this->useragent, $this->deviceNintendoDs) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is a Microsoft Xbox. function DetectXbox() { if (stripos($this->useragent, $this->deviceXbox) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is an Internet-capable game console. function DetectGameConsole() { if ($this->DetectSonyPlaystation() == $this->true) return $this->true; else if ($this->DetectNintendo() == $this->true) return $this->true; else if ($this->DetectXbox() == $this->true) return $this->true; else return $this->false; } //************************** // Detects if the current device supports MIDP, a mobile Java technology. function DetectMidpCapable() { if (stripos($this->useragent, $this->deviceMidp) > -1 || stripos($this->httpaccept, $this->deviceMidp) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current device is on one of the Maemo-based Nokia Internet Tablets. function DetectMaemoTablet() { if (stripos($this->useragent, $this->maemo) > -1) return $this->true; //For Nokia N810, must be Linux + Tablet, or else it could be something else. if ((stripos($this->useragent, $this->linux) > -1) && (stripos($this->useragent, $this->deviceTablet) > -1) && ($this->DetectWebOSTablet() == $this->false) && ($this->DetectAndroid() == $this->false)) return $this->true; else return $this->false; } //************************** // Detects if the current device is an Archos media player/Internet tablet. function DetectArchos() { if (stripos($this->useragent, $this->deviceArchos) > -1) return $this->true; else return $this->false; } //************************** // Detects if the current browser is a Sony Mylo device. function DetectSonyMylo() { if (stripos($this->useragent, $this->manuSony) > -1) { if ((stripos($this->useragent, $this->qtembedded) > -1) || (stripos($this->useragent, $this->mylocom2) > -1)) { return $this->true; } else return $this->false; } else return $this->false; } //************************** // The longer and more thorough way to detect for a mobile device. // Will probably detect most feature phones, // smartphone-class devices, Internet Tablets, // Internet-enabled game consoles, etc. // This ought to catch a lot of the more obscure and older devices, also -- // but no promises on thoroughness! function DetectMobileLong() { if ($this->DetectMobileQuick() == $this->true) return $this->true; if ($this->DetectGameConsole() == $this->true) return $this->true; if ($this->DetectSonyMylo() == $this->true) return $this->true; //Detect older phones from certain manufacturers and operators. if (stripos($this->useragent, $this->uplink) > -1) return $this->true; if (stripos($this->useragent, $this->manuSonyEricsson) > -1) return $this->true; if (stripos($this->useragent, $this->manuericsson) > -1) return $this->true; if (stripos($this->useragent, $this->manuSamsung1) > -1) return $this->true; if (stripos($this->useragent, $this->svcDocomo) > -1) return $this->true; if (stripos($this->useragent, $this->svcKddi) > -1) return $this->true; if (stripos($this->useragent, $this->svcVodafone) > -1) return $this->true; else return $this->false; } //***************************** // For Mobile Web Site Design //***************************** //************************** // The quick way to detect for a tier of devices. // This method detects for the new generation of // HTML 5 capable, larger screen tablets. // Includes iPad, Android (e.g., Xoom), BB Playbook, WebOS, etc. function DetectTierTablet() { if (($this->DetectIpad() == $this->true) || ($this->DetectAndroidTablet() == $this->true) || ($this->DetectBlackBerryTablet() == $this->true) || ($this->DetectWebOSTablet() == $this->true)) return $this->true; else return $this->false; } //************************** // The quick way to detect for a tier of devices. // This method detects for devices which can // display iPhone-optimized web content. // Includes iPhone, iPod Touch, Android, Windows Phone 7, WebOS, etc. function DetectTierIphone() { if (($this->isIphone == $this->true) || ($this->isAndroidPhone == $this->true)) return $this->true; if (($this->DetectBlackBerryWebKit() == $this->true) && ($this->DetectBlackBerryTouch() == $this->true)) return $this->true; if ($this->DetectWindowsPhone7() == $this->true) return $this->true; if ($this->DetectPalmWebOS() == $this->true) return $this->true; if ($this->DetectGarminNuvifone() == $this->true) return $this->true; else return $this->false; } //************************** // The quick way to detect for a tier of devices. // This method detects for devices which are likely to be capable // of viewing CSS content optimized for the iPhone, // but may not necessarily support JavaScript. // Excludes all iPhone Tier devices. function DetectTierRichCss() { if ($this->DetectMobileQuick() == $this->true) { //Exclude iPhone Tier and e-Ink Kindle devices if (($this->DetectTierIphone() == $this->true) || ($this->DetectKindle() == $this->true)) return $this->false; //The following devices are explicitly ok. if ($this->DetectWebkit() == $this->true) //Any WebKit return $this->true; if ($this->DetectS60OssBrowser() == $this->true) return $this->true; //Note: 'High' BlackBerry devices ONLY if ($this->DetectBlackBerryHigh() == $this->true) return $this->true; //Older Windows 'Mobile' isn't good enough for iPhone Tier. if ($this->DetectWindowsMobile() == $this->true) return $this->true; if (stripos($this->useragent, $this->engineTelecaQ) > -1) return $this->true; //default else return $this->false; } else return $this->false; } //************************** // The quick way to detect for a tier of devices. // This method detects for all other types of phones, // but excludes the iPhone and RichCSS Tier devices. function DetectTierOtherPhones() { //Exclude devices in the other 2 categories if (($this->DetectMobileLong() == $this->true) && ($this->DetectTierIphone() == $this->false) && ($this->DetectTierRichCss() == $this->false)) return $this->true; else return $this->false; } //Was informed by a MobileESP user that it's a best practice // to omit the closing ?> marks here. They can sometimes // cause errors with HTML headers. } $this->UTILS = new cs_utils(); $this->UTILS->_PATH = C_PATH.'/'.cs_utils; $this->UTILS->PATH = C_PATH.'/'.cs_utils; $this->UTILS->_DIR = C_DIR.'/'.cs_utils; $this->UTILS->DIR = C_DIR.'/'.cs_utils; ?>).(!empty($tip) ? ' onmouseover="tip(this,\''.$tip.'\')"':'').' />'.(!empty($legend) ? '':''); } function select($name, $options, $width=false, $disabled=false, $OCH_action=false, $id=false, $js_default_value=false) { if(!empty($disabled)) $if_dis=' disabled="disabled"'; if(!empty($OCH_action)) $if_OCH=' onchange="'.$OCH_action.'"'; if(!empty($width)) $if_width=' style="width:'.$width.'px;"'; if(!empty($js_default_value)) $js_default_value=' default_value="'.$js_default_value.'"'; if(empty($id)) $id=$name; return ''; } function multiselect($name, $options, $width=false, $size=0, $disabled=false, $id=false) { if(!empty($disabled)) $if_dis=' disabled="disabled"'; if(!empty($width)) $if_width=' style="width:'.$width.'px;"'; if(empty($id)) $id=$name; if(!is_numeric($size)) $size=5; $count=count(explode(' $count) $size=$count; if($count<1) $size=1; return '
'; } function multiselect2($name, $width, $size, $all_options, $selected_options=false, $selected_values=false, $separator=false, $max_limit=false) { global $CS; $CS->JS_HEAD[]=JS.'/jquery.mselect.js'; if($size>$max_limit && !empty($max_limit)) $size=$max_limit; if(empty($separator)) $separator=','; return '
'.$this->hidden($name.'_limit', $max_limit).' '.$this->hidden($name, @implode($separator,$selected_values)).' '; // '.$max_limit.' } function select_get_options($query, $selected=false) { global $CS; $cols=explode(',', $CS->STRING->textbetween('SELECT','FROM',$query)); $val=trim($cols[0]); $txt=trim($cols[1]); $sql=$CS->DB->query($query); while($dane=$CS->DB->fetch_array($sql)) { $html.=''; } return $html; } function select_dis($name, $value, $root, $table, $title_col) { global $CS; $dane = $CS->DB->single(' SELECT '.$title_col.' FROM '.$table.' WHERE id="'.$value.'" '); if(empty($dane)) $dane=$root; return $CS->FORM->hidden($name, $value).''.$dane.''; } function multiselect_js($name, $options, $width=false, $disabled=false, $OCH_action=false) { if(!empty($disabled)) $if_dis=' disabled="disabled"'; if(!empty($OCH_action)) $if_OCH=' onchange="'.$OCH_action.'"'; if(!empty($width)) $if_width=' style="width:'.$width.'px;"'; global $CS; $CS->JS_HEAD[]=JS.'/jquery.multiselect/multiselect.js'; $CS->CSS_HEAD[]=JS.'/jquery.multiselect/multiselect.css'; return ' '; } // TEXT ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function input_id($name, $id, $width=200, $value=false, $readonly=false, $disabled=false, $maxlen=false, $mask=false, $default_value=false, $center=false) { if(!empty($mask)) { global $CS; $CS->JS_HEAD[]=JS.'/jquery.mask.js'; $autoexec='$("#'.$id.'").mask("'.$mask.'");'; $mask=''; } if(!empty($default_value)) $default_value=' default_value="'.$default_value.'"'; if(!empty($center)) $center=' text-align:center;'; return 'interactive('input').' style="width:'.$width.'px;'.$center.'"'.(!empty($autoexec) ? ' autoexec=\''.$autoexec.'\'':'').($readonly==true ? ' readonly="readonly"':'').($disabled==true ? ' disabled="disabled"':'').($maxlen>0 ? ' maxlength="'.$maxlen.'"':'').$default_value.' />'.$mask; } function input($name, $width=200, $value=false, $readonly=false, $disabled=false, $maxlen=false, $mask=false, $default_value=false) { return $this->input_id($name, $name, $width, $value, $readonly, $disabled, $maxlen, $mask, $default_value); } function input_center($name, $width=200, $value=false, $readonly=false, $disabled=false, $maxlen=false, $mask=false, $default_value=false) { return $this->input_id($name, $name, $width, $value, $readonly, $disabled, $maxlen, $mask, $default_value, true); } function password_id($name, $id, $width=200, $value=false, $readonly=false, $disabled=false, $maxlen=false) { return 'interactive('input').' style="width:'.$width.'px" '.($readonly==true ? ' readonly="readonly"':'').($disabled==true ? ' disabled="disabled"':'').($maxlen>0 ? ' maxlength="'.$maxlen.'"':'').' />'; } function password($name, $width=200, $value=false, $readonly=false, $disabled=false, $maxlen=false) { return $this->password_id($name, $name, $width, $value, $readonly, $disabled, $maxlen); } // TEXTAREA & FORMATED /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function textarea_id($name, $id, $width=200, $height=63, $value=false, $readonly=false, $disabled=false, $maxlength=false, $nonresize=false, $row_tool=false) { if($maxlength>0) $maxlength=' maxlength="'.$maxlength.'" onkeyup="return isMaxLength(this)" onpaste="return isMaxLength(this)"'; if(!empty($row_tool)) $row_tool='
'.$row_tool.'
'; $t=''; if($nonresize==true) return $t; if(ADMIN===true) { return '
'.$t.'
'.$row_tool.'
'; } else { return $t; } } function textarea($name, $width=200, $height=63, $value=false, $readonly=false, $disabled=false, $maxlength=false, $nonresize=false) { return $this-> textarea_id($name, $name, $width, $height, $value, $readonly, $disabled, $maxlength, $nonresize, $row_tool); } function tiny($name, $width, $height, $value=false) { global $CS; $CS->JS_HEAD[]=$this->_DIR.'/tinymce/tiny_mce.js'; return ' '; } // HIDDEN //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function hidden_id($name, $id, $value=false) { return ''; } function hidden($name, $value=false) { return $this->hidden_id($name, $name, $value); } function hidden_noid($name, $value=false) { return ''; } // FILE ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function file_id($name, $id, $width=250) { global $CS; if(empty($id)) $id=$name; $size=round(($width-110)*0.195); if(ADMIN===true) { return ' interactive('input').' name="'.$name.'" id="'.$id.'" onchange="document.getElementById(\'_'.$id.'\').value=this.value" /> '; } else { return ' interactive('input').' name="'.$name.'" id="'.$id.'" onchange="document.getElementById(\'_'.$id.'\').value=this.value" /> '; } } function file($name, $width=250) { return $this->file_id($name, $name, $width); } // PICKERS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function kalendarz() { $a=func_get_args(); return call_user_func_array(array($this, 'calendar'), $a); } /** * * @global type $CS * @param type $name * @param type $value * @param string $format * @param string $date_sep * @param string $time_sep * @param type $readonly * @param type $disabled * @param type $id * @return type\ */ function calendar($name, $value=false, $formatdaty=false, $formatczasu=false, $readonly=false, $disabled=false, $id=false) { global $CS; $CS->JS_HEAD[]=JS.'/timepicker/timepicker.js'; if($value==false) $value = date("Y-m-d H:i:s",time()); if(empty($id)) $id=$name; $dttype = "datetimepicker"; if($formatdaty && $formatczasu) $dttype = "datetimepicker"; else if($formatdaty) $dttype = "datetimepicker"; else if($formatczasu) $dttype = "timepicker"; $autoexec=' $(function() { $( "#'.$id.'" ).'.$dttype.'({ timeFormat:"'.$formatczasu.'",dateFormat:"'.$formatdaty.'", showOn: "button", buttonImage: "../components/icons/datepicker-calendar.gif", buttonImageOnly: true, showTime:false }); '.(!empty($value) && $value!='0000-00-00'?'$( "#'.$id.'" ).'.$dttype.'("setDate", (new Date("'.date("Y/m/d H:i", strtotime($value)).'")));':'').' });'; if(ADMIN===true) { return ' interactive('input').(!empty($autoexec) ? ' autoexec=\''.$autoexec.'\'':'').($readonly==true ? ' readonly="readonly"':'').($disabled==true ? ' disabled="disabled"':'').' style="width:'.$width.'px" />  '; } else { if(strlen($format)==3) { $width=66; $maxlen=10; } if(strlen($format)==5) { $width=99; $maxlen=19; } return 'interactive('input').($readonly==true ? ' readonly="readonly"':'').($disabled==true ? ' disabled="disabled"':'').' style="text-align:center; width:'.$width.'px" maxlength="'.$maxlen.'" />'; } } /** * * @global type $CS * @param type $name * @param type $id * @param type $value * @return type */ function color_picker($name, $id=false, $value=false) { global $CS; $CS->CSS_HEAD[]=JS.'/colorpicker/colorpicker.css'; $CS->JS_HEAD[]=JS.'/colorpicker/colorpicker.js'; $CS->JS_HEAD[]=JS.'/jquery.mask.js'; if(empty($id)) $id=$name; if(!$value)$value="000000"; $mask='just_hex'; $autoexec=' $("#'.$id.', #'.$id.'_picker div").ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { $("#'.$id.'").val(hex); $("#'.$id.'_picker div").css("background-color", "#"+hex); $(el).ColorPickerHide(); }, onBeforeShow: function () { $(this).ColorPickerSetColor($("#'.$id.'").val()); } }) .bind("keyup", function(){ $(this).ColorPickerSetColor(this.value); }); ';//$("#'.$id.'").mask("'.$mask.'"); color_picker("'.$id.'"); //$autoexec_type='color_picker'; //.(!empty($autoexec) ? ' autoexec=\''.$autoexec.'\'':'')(!empty($autoexec_type) ? ' autoexec_type=\''.$autoexec_type.'\'':'')..$this->interactive('input') return '
#
'; } // UTILS /////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// function link_js($href, $anchor, $img_before=false, $img_after=false) { if(!empty($img_before)) $img_before=''; if(!empty($img_after)) $img_after=''; return $img_before.''.$anchor.''.$img_after; } function link_potwierdzenie($link, $anchor, $tekst=false) { if(empty($tekst)) $tekst='Na pewno?'; return ''.$anchor.''; } function focus($field) { return ''; } function tip($value,$width=false) { if(empty($value)) return false; $value=str_replace(' ','
',$value); $value=str_replace('"','"',$value); return 'onmouseover="tip(this,\''.$value.'\',false,'.($width>0 ? $width : 'false').')"'; } function label($value, $width=false, $center=false) { return ''.$value.''; } function info($tip, $img=false) { global $CS; if(empty($img)) $img=ICONS.'/form/info.gif'; return 'FORM->tip($tip).' />'; } function tr() { $html.=''; for($i=0;$i'; $html.=''; return $html; } function tr_array($cols=false) { $html.=''; foreach($cols as $c) $html.=''.$c.''; $html.=''; return $html; } function tr_sep($p=5) { return '
'; } } $this->FORM = new cs_form(); $this->FORM->_PATH = C_PATH.'/'.cs_form; $this->FORM->PATH = C_PATH.'/'.cs_form; $this->FORM->_DIR = C_DIR.'/'.cs_form; $this->FORM->DIR = C_DIR.'/'.cs_form; ?>
Fatal error: Call to a member function hidden() on a non-object in /classes/_content.php on line 182