Пример #1
0
 /**
  * array'den link oluşturur
  *
  * @param array $arr
  * @return strıng
  */
 private static function arrayToUrl(array $arr)
 {
     $url = '';
     foreach ($arr as $name => $value) {
         if ($name == 'page') {
             $url .= trim($value) . '?';
         } else {
             $url .= $name . '=' . Form::setInput(trim($value)) . '&';
         }
     }
     return preg_replace('/\\?$|&$|=$|=+&$/', '', $url);
 }
Пример #2
0
 /**
  * sayfa redirect yapar
  *
  * @param string $url
  */
 public static function redirect($url)
 {
     if (!headers_sent()) {
         header("Location: {$url}");
     } else {
         if (preg_match('/api\\./', $_SERVER['SERVER_NAME'])) {
             $API = new Api();
             $API->setReturn(false);
             $API->setData($url);
             $API->setMessage('Sayfa Yönlendirme');
             echo $API->get();
         } else {
             printf("<script type=\"text/javascript\">window.location.href='%s'</script>", Form::setInput($url));
         }
     }
     exit(0);
 }
Пример #3
0
 /**
  * Creates the head of the form.
  *
  * @param ModelForm $form
  */
 protected function prepareHeadForm(ModelForm $form)
 {
     $this->output = "<form name='input' action='{$form->getAction()}' method='{$form->getMethod()}'>";
 }
Пример #4
0
 /**
  * Check if the submit form value use the show command to debug.
  *
  * @param string $coord
  * @return bool
  */
 public function isDebug()
 {
     $coords = $this->form->getParameterData('coord');
     return !is_null($coords) && 'show' == $coords;
 }