/** * backend 가 설치된 경로를 리턴한다. * @usage FORM 문장에서 backend 의 주소를 'action' 속성에 기록하고자 할 때, 이 함수를 사용하면 된다. * @note 끝에 index.php 를 없애고 설치 폴더의 '/' 까지만 기록한다. * @return string */ function url_install_dir() { $url_script = url_script(); return str_replace("/index.php", '/', $url_script); }
<?php /* Prints out a small search <form>. */ if (true) { $pid = defined("EWIKI_PAGE_POWERSEARCH") ? EWIKI_PAGE_POWERSEARCH : EWIKI_PAGE_SEARCH; echo '<form action="' . url_script("", $pid) . '" method="GET" accept-charset="ISO-8859-1">' . '<input type="text" name="q" size="12">' . '<input type="submit" value="?">' . '</form>' . "\n"; }
?> </span> <span class="value"><?php echo $cat['value']; ?> </span> <span class="button category-edit-button">Edit</span> <span class="button category-delete-button" route="company.Controller.categoryDelete&id=<?php echo $cat['id']; ?> " callback="reloadCategoryList" >Delete</span> <form class='philgo-banner-form' action="<?php echo url_script(); ?> ?route=data.Controller.fileUpload" method="post" enctype="multipart/form-data"> <input type="hidden" name="gid" value="company-category"> <input type="hidden" name="code" value="<?php echo $cat['id']; ?> "> <input type="hidden" name="unique" value="1"> <input type="hidden" name="finish" value="1"> <input type="file" name="userfile" onchange="on_change_file_upload(this);"> </form> </div> </div> <?php }
private function url($filename) { $url = url_script(); $path = parse_url($url, PHP_URL_PATH); $path = str_replace('/index.php', '', $path); return url_domain() . $path . '/' . PATH_DATA_UPLOAD . '/' . $filename; }