function showRecent() { $numResults = 10; $urlLen = 60; $query = "select id, url from main order by creation desc limit {$numResults}"; $status = mysql_query($query); $query = "select id, url, count from main order by count desc limit {$numResults}"; $countresult = mysql_query($query); $query = "select id, url, count from main order by accessed desc limit {$numResults}"; $accessresult = mysql_query($query); $query = "select id from main order by creation desc limit 1"; $randresult = mysql_query($query); $numrows = mysql_num_rows($status); if ($numrows == 0) { print "no links yet!"; } else { $siteurl = getSiteUrl(); print "<br />"; print "<b>random mooshu'd link:</b>"; $randrow = mysql_fetch_array($randresult); $randurlid = rand(1, $randrow['id']); $shortenedID = shortenUrlID($randurlid); print "<br />"; print "<ul>"; print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b></li>"; print "</ul>"; print "<br />"; print "<b>recently mooshu'd links:</b>"; print "<ul>"; while ($row = mysql_fetch_array($status)) { $shortenedID = shortenUrlID($row['id']); $url = $row['url']; $suburl = substr($row['url'], 0, $urlLen); print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b>: <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>"; } print "</ul>"; print "<br />"; print "<b>most accessed mooshu'd links:</b>"; print "<ul>"; while ($row = mysql_fetch_array($countresult)) { $shortenedID = shortenUrlID($row['id']); $url = $row['url']; $suburl = substr($row['url'], 0, $urlLen); $count = $row['count']; print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b> ({$count}): <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>"; } print "</ul>"; print "<br />"; print "<b>recently accessed mooshu'd links:</b>"; print "<ul>"; while ($row = mysql_fetch_array($accessresult)) { $shortenedID = shortenUrlID($row['id']); $url = $row['url']; $suburl = substr($row['url'], 0, $urlLen); $count = $row['count']; print "<li><b><a href=\"{$siteurl}/{$shortenedID}\">{$siteurl}/{$shortenedID}</a></b> ({$count}): <a href=\"{$url}\" rel=\"nofollow\">{$suburl}...</a></li>"; } print "</ul>"; } }
/** * The constructor of the RSS class. * * @param $title the title of the page that generates the rss. * @param $linkPath the link of the page that generates the rss. * @param $description the description of the page. * @param $atomLinkSelf the url that point to the RSS feed. */ public function __construct($title, $linkPath, $description, $atomLinkSelf) { $this->title = $title; $this->link = getSiteUrl() . $linkPath; $this->description = $description; $this->atomLinkSelf = $atomLinkSelf; }
/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate($id) { $model = $this->loadModel($id); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); // ma($model); if (isset($_POST['Productcategory'])) { $image = $model->image; $model->attributes = $_POST['Productcategory']; $uploadFile = CUploadedFile::getInstance($model, 'image'); if ($uploadFile) { $model->image = getSiteUrl() . '/categoryimg/' . $uploadFile->name; } else { $model->image = $image; } $model->display_in_menu = $_POST['Productcategory']['display_in_menu']; // ma($model); if ($model->save()) { if ($uploadFile) { $PATH = Yii::getPathOfAlias("webroot.categoryimg") . '/' . $uploadFile->name; $uploadFile->saveAs($PATH); } // $this->redirect(array('view', 'id' => $model->id)); $this->redirect(array('productcategory/admin')); } } $this->render('update', array('model' => $model)); }
/** * @brief 카페 메인 출력 **/ function dispHomepageIndex() { $oHomepageAdminModel =& getAdminModel('homepage'); $oHomepageModel =& getModel('homepage'); $oModuleModel =& getModel('module'); $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin); if (!is_dir($template_path) || !$this->module_info->skin) { $this->module_info->skin = 'xe_default'; $template_path = sprintf("%sskins/%s/", $this->module_path, $this->module_info->skin); } $this->setTemplatePath($template_path); // 카페 목록을 구함 $page = Context::get('page'); $output = $oHomepageAdminModel->getHomepageList($page); if ($output->data && count($output->data)) { foreach ($output->data as $key => $val) { $banner_src = 'files/attach/cafe_banner/' . $val->site_srl . '.jpg'; if (file_exists(_XE_PATH_ . $banner_src)) { $output->data[$key]->cafe_banner = $banner_src . '?rnd=' . filemtime(_XE_PATH_ . $banner_src); } $url = getSiteUrl($val->domain, ''); if (substr($url, 0, 1) == '/') { $url = substr(Context::getRequestUri(), 0, -1) . $url; } $output->data[$key]->url = $url; } } Context::set('total_count', $output->total_count); Context::set('total_page', $output->total_page); Context::set('page', $output->page); Context::set('homepage_list', $output->data); Context::set('page_navigation', $output->page_navigation); // 카페 생성 권한 세팅 if ($oHomepageModel->isCreationGranted()) { Context::set('isEnableCreateCafe', true); Context::addJsFilter($this->module_path . 'tpl/filter', 'cafe_creation.xml'); } // 카페의 최신 글 추출 $output = executeQueryArray('homepage.getNewestDocuments'); Context::set('newest_documents', $output->data); // 카페의 최신 댓글 추출 $output = executeQueryArray('homepage.getNewestComments'); Context::set('newest_comments', $output->data); $logged_info = Context::get('logged_info'); if ($logged_info->member_srl) { $myargs->member_srl = $logged_info->member_srl; $output = executeQueryArray('homepage.getMyCafes', $myargs); Context::set('my_cafes', $output->data); } $homepage_info = $oModuleModel->getModuleConfig('homepage'); if ($homepage_info->use_rss == 'Y') { Context::set('rss_url', getUrl('', 'mid', $this->module_info->mid, 'act', 'rss')); } $this->setTemplateFile('index'); }
/** * Updates a particular model. * If update is successful, the browser will be redirected to the 'view' page. * @param integer $id the ID of the model to be updated */ public function actionUpdate($id) { $model = $this->loadModel($id); // Uncomment the following line if AJAX validation is needed // $this->performAjaxValidation($model); if (isset($_POST['Product'])) { $model->attributes = $_POST['Product']; $pos = strpos($model->pic, 'productimg/'); if ($pos) { $model->pic = getSiteUrl() . $model->pic; } // $imgName = str_replace("/productimg/", "", $model->pic); // $model->pic = $imgName; if (count($model->per100g)) { $per100g = array(); foreach ($model->per100g as $name => $value) { if (!$value['label'] && !$value['value']) { continue; } $per100g[$name] = $value; } if (count($per100g)) { $model->per100g = json_encode($per100g); } else { $model->per100g = ''; } } if (count($model->allergies)) { $model->allergies = implode(',', $model->allergies); } if (count($model->ingredients)) { $model->ingredients = implode(',', $model->ingredients); } if ($model->save()) { $this->redirect(array('product/admin')); } } $this->render('update', array('model' => $model)); }
/** * @brief array로 정렬된 노드들을 php code로 변경하여 return * 메뉴에서 메뉴를 tpl에 사용시 xml데이터를 사용할 수도 있지만 별도의 javascript 사용이 필요하기에 * php로 된 캐시파일을 만들어서 db이용없이 바로 메뉴 정보를 구할 수 있도록 한다 * 이 캐시는 ModuleHandler::displayContent() 에서 include하여 Context::set() 한다 **/ function getPhpCacheCode($source_node, $tree, $site_srl, $domain) { $output = array("buff" => "", "url_list" => array()); if (!$source_node) { return $output; } $oMenuAdminModel =& getAdminModel('menu'); foreach ($source_node as $menu_item_srl => $node) { // 자식 노드가 있으면 자식 노드의 데이터를 먼저 얻어옴 if ($menu_item_srl && $tree[$menu_item_srl]) { $child_output = $this->getPhpCacheCode($tree[$menu_item_srl], $tree, $site_srl, $domain); } else { $child_output = array("buff" => "", "url_list" => array()); } // 변수 정리 $names = $oMenuAdminModel->getMenuItemNames($node->name, $site_srl); foreach ($names as $key => $val) { $name_arr_str .= sprintf('"%s"=>"%s",', $key, str_replace('\\', '\\\\', htmlspecialchars($val))); } $name_str = sprintf('$_menu_names[%d] = array(%s); %s', $node->menu_item_srl, $name_arr_str, $child_output['name']); // 현재 노드의 url값이 공란이 아니라면 url_list 배열값에 입력 if ($node->url) { $child_output['url_list'][] = $node->url; } $output['url_list'] = array_merge($output['url_list'], $child_output['url_list']); // node->group_srls값이 있으면 if ($node->group_srls) { $group_check_code = sprintf('($is_admin==true||(is_array($group_srls)&&count(array_intersect($group_srls, array(%s)))))', $node->group_srls); } else { $group_check_code = "true"; } // 변수 정리 $href = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $node->href); $url = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $node->url); if (preg_match('/^([0-9a-zA-Z\\_\\-]+)$/i', $node->url)) { $href = getSiteUrl($domain, '', 'mid', $node->url); $pos = strpos($href, $_SERVER['HTTP_HOST']); if ($pos !== false) { $href = substr($href, $pos + strlen($_SERVER['HTTP_HOST'])); } } else { $href = $url; } $open_window = $node->open_window; $normal_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $node->normal_btn); $hover_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $node->hover_btn); $active_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $node->active_btn); $selected = '"' . implode('","', $child_output['url_list']) . '"'; $child_buff = $child_output['buff']; $expand = $node->expand; $normal_btn = $node->normal_btn; if ($normal_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $normal_btn)) { $normal_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $normal_btn); } else { $normal_btn = ''; } $hover_btn = $node->hover_btn; if ($hover_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $hover_btn)) { $hover_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $hover_btn); } else { $hover_btn = ''; } $active_btn = $node->active_btn; if ($active_btn && preg_match('/^\\.\\/files\\/attach\\/menu_button/i', $active_btn)) { $active_btn = str_replace(array('&', '"', '<', '>'), array('&', '"', '<', '>'), $active_btn); } else { $active_btn = ''; } $group_srls = $node->group_srls; if ($normal_btn) { if (preg_match('/\\.png$/', $normal_btn)) { $classname = 'class=\\"iePngFix\\"'; } else { $classname = ''; } if ($hover_btn) { $hover_str = sprintf('onmouseover=\\"this.src=\'%s\'\\"', $hover_btn); } else { $hover_str = ''; } if ($active_btn) { $active_str = sprintf('onmousedown=\\"this.src=\'%s\'\\"', $active_btn); } else { $active_str = ''; } $link = sprintf('"<img src=\\"%s\\" onmouseout=\\"this.src=\'%s\'\\" alt=\\"".$_menu_names[%d][$lang_type]."\\" %s %s %s />"', $normal_btn, $normal_btn, $node->menu_item_srl, $hover_str, $active_str, $classname); if ($active_btn) { $link_active = sprintf('"<img src=\\"%s\\" alt=\\"".$_menu_names[%d][$lang_type]."\\" %s />"', $active_btn, $node->menu_item_srl, $classname); } else { $link_active = $link; } } else { $link_active = $link = sprintf('$_menu_names[%d][$lang_type]', $node->menu_item_srl); } // 속성을 생성한다 ( url_list를 이용해서 선택된 메뉴의 노드에 속하는지를 검사한다. 꽁수지만 빠르고 강력하다고 생각;;) $attribute = sprintf('"node_srl"=>"%s","parent_srl"=>"%s","text"=>(%s?$_menu_names[%d][$lang_type]:""),"href"=>(%s?"%s":""),"url"=>(%s?"%s":""),"open_window"=>"%s","normal_btn"=>"%s","hover_btn"=>"%s","active_btn"=>"%s","selected"=>(array(%s)&&in_array(Context::get("mid"),array(%s))?1:0),"expand"=>"%s", "list"=>array(%s), "link"=>(%s? ( array(%s)&&in_array(Context::get("mid"),array(%s)) ?%s:%s):""),', $node->menu_item_srl, $node->parent_srl, $group_check_code, $node->menu_item_srl, $group_check_code, $href, $group_check_code, $url, $open_window, $normal_btn, $hover_btn, $active_btn, $selected, $selected, $expand, $child_buff, $group_check_code, $selected, $selected, $link_active, $link); // buff 데이터를 생성한다 $output['buff'] .= sprintf('%s=>array(%s),', $node->menu_item_srl, $attribute); $output['name'] .= $name_str; } return $output; }
<?php if (!defined("__XE__")) { exit; } ?> <div class="bd_bc fl"> <a href="<?php echo getSiteUrl(); ?> "><strong>Home</strong></a> <?php if ($__Context->main_menu->list && count($__Context->main_menu->list)) { foreach ($__Context->main_menu->list as $__Context->key1 => $__Context->val1) { if ($__Context->val1['selected']) { ?> <span>›</span><a href="<?php echo $__Context->val1['href']; ?> "><?php if (!$__Context->val1['list']) { ?> <em><?php echo $__Context->val1['text']; ?> </em><?php } else { echo $__Context->val1['text']; } ?> </a>
function _compile($args, $content_items) { $oTemplate =& TemplateHandler::getInstance(); // 위젯에 넘기기 위한 변수 설정 $widget_info->modules_info = $args->modules_info; $widget_info->option_view_arr = $args->option_view_arr; $widget_info->list_count = $args->list_count; $widget_info->page_count = $args->page_count; $widget_info->subject_cut_size = $args->subject_cut_size; $widget_info->content_cut_size = $args->content_cut_size; $widget_info->duration_new = $duration_new * 60 * 60; $widget_info->thumbnail_type = $args->thumbnail_type; $widget_info->thumbnail_width = $args->thumbnail_width; $widget_info->thumbnail_height = $args->thumbnail_height; $widget_info->cols_list_count = $args->cols_list_count; $widget_info->mid_lists = $args->mid_lists; $widget_info->show_browser_title = $args->show_browser_title; $widget_info->show_category = $args->show_category; $widget_info->show_comment_count = $args->show_comment_count; $widget_info->show_trackback_count = $args->show_trackback_count; $widget_info->show_icon = $args->show_icon; $widget_info->list_type = $args->list_type; $widget_info->tab_type = $args->tab_type; $widget_info->markup_type = $args->markup_type; // 탭형태일경우 탭에 대한 정보를 정리하고 module_srl로 되어 있는 key값을 index로 변경 if ($args->tab_type != 'none' && $args->tab_type) { $tab = array(); foreach ($args->mid_lists as $module_srl => $mid) { if (!is_array($content_items[$module_srl]) || !count($content_items[$module_srl])) { continue; } unset($tab_item); $tab_item->title = $content_items[$module_srl][0]->getBrowserTitle(); $tab_item->content_items = $content_items[$module_srl]; $tab_item->domain = $content_items[$module_srl][0]->getDomain(); $tab_item->url = $content_items[$module_srl][0]->getContentsLink(); if (!$tab_item->url) { $tab_item->url = getSiteUrl($tab_item->domain, '', 'mid', $mid); } $tab[] = $tab_item; } $widget_info->tab = $tab; } else { $widget_info->content_items = $content_items; } unset($args->option_view_arr); unset($args->modules_info); Context::set('colorset', $args->colorset); Context::set('widget_info', $widget_info); $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); return $oTemplate->compile($tpl_path, "content"); }
function dispMultiPostTextyle() { // $document_srl is obtained only at Comment Reply and Comment Modify. $document_srl = Context::get('document_srl'); $oDocumentModel =& getModel('document'); $category = Context::get('category'); if ($document_srl) { $oDocument = $oDocumentModel->getDocument($document_srl, false, false); // If document exists, then this is a comment posting case, // so we don't need to perform all other operations if ($oDocument->isExists()) { // If this document doesn't belong to this blog module, // ignore it. if ($oDocument->get('module_srl') != $this->module_info->module_srl) { return $this->stop('msg_invalid_request'); } } else { Context::set('document_srl', '', true); return $this->stop('msg_invalid_request'); } } else { $alias_title = Context::get('alias_title'); if ($alias_title) { $query_arguments->alias_title = "/" . $alias_title . "/"; $output = executeQuery('textyle.getDocumentSrlByAlias', $query_arguments); if ($output->data) { $document_srl = $output->data->document_srl; $oDocument = $oDocumentModel->getDocument($document_srl, false, false); if ($oDocument->isExists()) { $oDocument->alias_title = $category . '/' . $alias_title . '/'; } } } } // set the page $page = Context::get('page'); $page = $page > 0 ? $page : 1; Context::set('page', $page); // get a list of categories of textyle $category_list = $oDocumentModel->getCategoryList($this->module_srl); Context::set('module_name', $this->textyle->domain); Context::set('category_list', $category_list); // Wanted Post List $args->module_srl = $this->module_srl; $args->page_count = 10; $args->sort_index = Context::get('sort_index'); $args->order_type = Context::get('order_type'); if (!in_array($args->sort_index, $this->order_target)) { $args->sort_index = $this->module_info->order_target ? $this->module_info->order_target : 'list_order'; } if (!in_array($args->order_type, array('asc', 'desc'))) { $args->order_type = $this->module_info->order_type ? $this->module_info->order_type : 'asc'; } $recentTags = array(); // ì„ íƒ�ë�œ 글ì�´ 하나ë�¼ë�„ 글 목ë¡�으로 형성 if ($oDocument && $oDocument->isExists()) { $mode = 'content'; // set the browser title Context::setBrowserTitle($oDocument->getTitle() . ' | ' . $this->textyle->get('browser_title')); // set meta keywords category + all tags of the document $docTags = $oDocument->get('tags'); $category_srl = $oDocument->get('category_srl'); if ($category_srl) { $tags = $category_list[$category_srl]->title; } if ($docTags) { $docTagsArray = $oDocument->get('tag_list'); foreach ($docTagsArray as $tag) { ++$recentTags[$tag]; } $tags .= ($tags ? ',' : '') . $docTags; } // ì„ íƒ�ë�œ 글ì�´ 하나ì�¼ 경우 ì�´ì „/ 다ì�Œ 페ì�´ì§€ 구함 + 조회수 ì¦�ê°€ + referer 기ë¡� $oDocument->updateReadedCount(); // referer 남김 $oTextyleController =& getController('textyle'); $oTextyleController->insertReferer($oDocument); // 관리 권한ì�´ 있다면 권한ì�„ 부여 if ($this->grant->manager) { $oDocument->setGrant(); } $oDocument->variables['relative_date'] = $this->zdateRelative($oDocument->getRegdateTime()); $document_list[] = $oDocument; $nr_documents = count($document_list); Context::set('nr_documents', $nr_documents); if ($nr_documents == 1) { $_comment_list = $oDocument->getComments(); if (isset($_comment_list)) { foreach ($_comment_list as $comment) { $comment->variables['relativeDate'] = $this->zdateRelative($comment->getRegdateTime()); } } Context::set('_comment_list', $_comment_list); } Context::set('document_list', $document_list); } else { $mode = $this->textyle->getPostStyle(); // Check if the search is within a specific tag $search_target = Context::get('search_target'); if ($search_target == 'tags') { $args->tag = Context::get('search_keyword'); } // Get the category $args->category_srl = urldecode($category); if ($args->category_srl && !is_numeric($args->category_srl)) { $arguments->category_title = $args->category_srl; $arguments->module_srl = $this->module_srl; $output = executeQuery('textyle.getCategorySrl', $arguments); if ($output->data) { $args->category_srl = $output->data->category_srl; $args->categories[] = $args->category_srl; if ($category_list[$args->category_srl]->child_count) { foreach ($category_list[$args->category_srl]->childs as $child) { $args->categories[] = $child; } } $tags = $category_list[$args->category_srl]->title; // set the browser title for this category Context::setBrowserTitle($tags . ' | ' . $this->textyle->get('browser_title')); } } else { $args->category_srl = Context::get('category_srl'); } // If there is such a category if ($args->category_srl) { Context::set('selected_category', $category_list[$args->category_srl]->title); } elseif ($page == 1 && !isset($args->tag)) { $args->module_srl = $this->module_srl; $args->start_date = date('YmdHis', strtotime("-1 month")); $args->end_date = date('YmdHis'); $args->sort_index = 'readed_count'; $args->page = 1; $args->list_count = 3; $mostPopularBlogs = $this->getDocumentItems('textyle.getTopViewDocumentsInDateRange', $args); foreach ($mostPopularBlogs->data as $popularBlog) { $popularBlog->variables['relative_date'] = $this->zdateRelative($popularBlog->getRegdateTime()); if ($popularBlog->get('alias_title')) { $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $popularBlog->get('alias_title'); } else { $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $popularBlog->get('document_srl'); } } Context::set('mostPopularBlogs', $mostPopularBlogs->data); unset($args->start_date); unset($args->end_date); $args->list_count = 5; $args->page = $page; $allPopularBlogs = $this->getDocumentItems('textyle.getAllTimeTopViewDocuments', $args); foreach ($allPopularBlogs->data as $popularBlog) { $popularBlog->variables['relative_date'] = $this->zdateRelative($popularBlog->getRegdateTime()); if ($popularBlog->get('alias_title')) { $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $popularBlog->get('alias_title'); } else { $popularBlog->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $popularBlog->get('document_srl'); } } Context::set('allPopularBlogs', $allPopularBlogs->data); } // Get a list of latest posts $args->module_srl = $this->module_srl; $args->list_count = $this->textyle->getPostListCount(); $args->sort_index = 'list_order'; $args->page = $page; $args->page_count = 10; $latestBlogs = $this->getDocumentItems('textyle.getPosts', $args); Context::set('latestBlogs', $latestBlogs->data); Context::set('page_navigation', $latestBlogs->page_navigation); if (isset($latestBlogs->data)) { foreach ($latestBlogs->data as $document) { $docTags = $document->get('tag_list'); if (isset($docTags)) { foreach ($docTags as $tag) { $recentTags[$tag]++; } } $document->variables['relative_date'] = $this->zdateRelative($document->getRegdateTime()); if ($document->get('alias_title')) { $document->variables['url'] = getSiteUrl() . $this->textyle->domain . '/entry/' . $document->get('alias_title'); } else { $document->variables['url'] = getSiteUrl() . $this->textyle->domain . '/' . $document->get('document_srl'); } } } arsort($recentTags); $tags .= ',' . implode(',', array_keys($recentTags)); } Context::addHtmlHeader(sprintf('<meta name="keywords" content="%s" />', $tags)); Context::addJsFilter($this->module_path . 'skins/' . $this->module_info->skin . '/filter', 'insert_comment.xml'); Context::set('textyle_mode', $mode); Context::set('recentTags', $recentTags); Context::set('module_path', $this->module_path); }
define("REQ_URL_QRY", "http://payment-test.chinapay.com/QueryWeb/processQuery.jsp"); //查询请求地址(生产) //define("REQ_URL_QRY","http://console.chinapay.com/QueryWeb/processQuery.jsp"); //退款请求地址(测试) define("REQ_URL_REF", "http://payment-test.chinapay.com/refund/SingleRefund.jsp"); //退款请求地址(生产) //define("REQ_URL_REF","https://bak.chinapay.com/refund/SingleRefund.jsp"); function getcwdOL() { $total = $_SERVER[PHP_SELF]; $file = explode("/", $total); $file = $file[sizeof($file) - 1]; return substr($total, 0, strlen($total) - strlen($file) - 1); } function getSiteUrl() { $host = $_SERVER[SERVER_NAME]; $port = $_SERVER[SERVER_PORT] == "80" ? "" : ":{$_SERVER['SERVER_PORT']}"; return "http://" . $host . $port . getcwdOL(); } function traceLog($file, $log) { $f = fopen($file, 'a'); if ($f) { fwrite($f, date('Y-m-d H:i:s') . " => {$log}\n"); fclose($f); } } //取得本示例安装位置 $site_url = getSiteUrl();
</tr> </table> </td> </tr> <?php } ?> <?php } ?> <?php } ?> </table> <?php echo "<img src='" . getSiteUrl() . "/images/Line.jpg' style='height:2px;width:550px'>"; ?> <table> <tr> <td> <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px">Thank You</div> <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px">Speak to you soon</div> <div style="width:400px;margin-top:10px;font-style:italic;color:green;font-size:14px"><?php echo $namee1; ?> </div> </td> </tr> </table> </div> </div>
<p class="opttext"> <?php echo $model->desc9; ?> </p> </div> </div> <?php } ?> <?php if ($model->image10) { ?> <div> <img u=image src="<?php echo getSiteUrl() . $model->image10; ?> " /> <div u="thumb"> <h4 class="opthead">Thank You Ten</h4> <p class="opttext"> <?php echo $model->order10; ?> </p> <p class="opttext"> <?php echo $model->desc10; ?> </p> </div>
/** * @brief 위젯의 실행 부분 * * ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다 * 결과를 만든후 print가 아니라 return 해주어야 한다 **/ function proc($args) { // 대상 모듈 (mid_list는 기존 위젯의 호환을 위해서 처리하는 루틴을 유지. module_srls로 위젯에서 변경) $oModuleModel =& getModel('module'); if ($args->mid_list) { $mid_list = explode(",", $args->mid_list); if (count($mid_list)) { $module_srls = $oModuleModel->getModuleSrlByMid($mid_list); if (count($module_srls)) { $args->module_srls = implode(',', $module_srls); } else { $args->module_srls = null; } } } // 제목 $title = $args->title; // 정렬 대상 $order_target = $args->order_target; if (!in_array($order_target, array('list_order', 'update_order'))) { $order_target = 'list_order'; } // 정렬 순서 $order_type = $args->order_type; if (!in_array($order_type, array('asc', 'desc'))) { $order_type = 'asc'; } // 출력된 목록 수 $list_count = (int) $args->list_count; if (!$list_count) { $list_count = 5; } // 제목 길이 자르기 $subject_cut_size = $args->subject_cut_size; if (!$subject_cut_size) { $subject_cut_size = 0; } // 최근 글 표시 시간 $duration_new = $args->duration_new; if (!$duration_new) { $duration_new = 12; } // 대상 모듈이 선택되어 있지 않으면 해당 사이트의 전체 모듈을 대상으로 함 $site_module_info = Context::get('site_module_info'); if ($args->module_srls) { $obj->module_srl = $args->module_srls; } else { if ($site_module_info) { $obj->site_srl = (int) $site_module_info->site_srl; } } // newest_document 위젯에서 정의한 query문을 직접 사용 $obj->sort_index = 'documents.' . $order_target; $obj->order_type = $order_type == "desc" ? "asc" : "desc"; $obj->list_count = $list_count; $output = executeQueryArray('widgets.newest_document.getNewestDocuments', $obj); // document 모듈의 model 객체를 받아서 결과를 객체화 시킴 $oDocumentModel =& getModel('document'); // 오류가 생기면 그냥 무시 if (!$output->toBool()) { return; } // 결과가 있으면 각 문서 객체화를 시킴 $modules = array(); if (count($output->data)) { foreach ($output->data as $key => $attribute) { $modules[$attribute->module_srl]->mid = $attribute->mid; $modules[$attribute->module_srl]->site_srl = $attribute->site_srl; $document_srl = $attribute->document_srl; $oDocument = null; $oDocument = new documentItem(); $oDocument->setAttribute($attribute, false); $GLOBALS['XE_DOCUMENT_LIST'][$oDocument->document_srl] = $oDocument; $document_list[$key] = $oDocument; } $oDocumentModel->setToAllDocumentExtraVars(); } else { $document_list = array(); } // 모듈이 하나만 선택되었을 경우 대상 모듈 이름과 링크를 생성 if (count($modules) == 1) { $info = array_shift($modules); if ($info) { $widget_info->mid = $info->mid; if ($info->site_srl) { $site_info = $oModuleModel->getSiteInfo($info->site_srl); if ($site_info->domain) { $widget_info->more_link = getSiteUrl('http://' . $site_info->domain, '', 'mid', $widget_info->mid); } } else { $widget_info->more_link = getUrl('', 'mid', $info->mid); $widget_info->module_name = $info->mid; } } } $widget_info->title = $title; $widget_info->document_list = $document_list; $widget_info->subject_cut_size = $subject_cut_size; $widget_info->duration_new = $duration_new * 60 * 60; $widget_info->display_regdate = $args->display_regdate == 'N' ? 'N' : 'Y'; Context::set('widget_info', $widget_info); // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); Context::set('colorset', $args->colorset); // 템플릿 파일을 지정 $tpl_file = 'list'; // 템플릿 컴파일 $oTemplate =& TemplateHandler::getInstance(); $output = $oTemplate->compile($tpl_path, $tpl_file); return $output; }
if (!defined("__XE__")) { exit; } ?> <div class="x_page-header"> <h1> <?php echo $__Context->lang->ncart; ?> <?php if ($__Context->module_info->mid) { ?> <span class="path"> > <a href="<?php echo getSiteUrl($__Context->module_info->domain, '', 'mid', $__Context->module_info->mid); ?> "<?php if ($__Context->module == 'admin') { ?> target="_blank"<?php } ?> ><?php echo $__Context->module_info->mid; if ($__Context->module_info->is_default == 'Y') { ?> (<?php echo $__Context->lang->is_default; ?> )<?php
</td> <?php if (Yii::app()->user->isUser()) { ?> <td> <div class="flike"> <?php if (Yii::app()->user->isUser()) { // echo CHtml::image(getSiteUrl() . '/images/like.png', 'like', array('onClick' => 'js:setVal1(like' . $key . ')')); // echo CHtml::hiddenField("selproduct[like$key]", $selproductsComment[$key]['like'], array('id' => 'like' . $key)); // e($selproductsComment); if ($selproductsComment[$key]['like']) { echo CHtml::image(getSiteUrl() . '/images/like1.png', 'like', array('onClick' => 'js:setVal1("selprod",' . $key . ')')); echo CHtml::hiddenField("selprod[{$key}][like]", '1'); } else { echo CHtml::image(getSiteUrl() . '/images/like.png', 'like', array('onClick' => 'js:setVal1("selprod",' . $key . ')')); echo CHtml::hiddenField("selprod[{$key}][like]", '0'); } echo "<div class='com'>"; $this->renderPartial('//decorators/selprod', array('selprod' => $selproductsComment, 'admin' => $admin, 'type' => 'selproduct' . $key, 'key' => $key, 'id' => $selproductsComment[$key]['id'])); echo "</div>"; } ?> </div> </td> <?php } ?> </tr> <?php }
/** * @return string the associated database table name */ public static function getStatusIcon($id, $customerId) { $model = Status::model()->findByAttributes(array('status' => $id)); // echo CHtml::image(getSiteUrl() . '/images/status/' . $model->image, $model->title, array('title' => $model->title,'data-toggle' => 'popover','title' => 'Status','class' => "popover-top",'customer-id' => $customerId,'style' => 'width:15px')); echo CHtml::image(getSiteUrl() . '/images/status/' . $model->image, $model->title, array('title' => $model->title, 'data-toggle' => 'popover', 'title' => 'Status', 'class' => "", 'customer-id' => $customerId, 'style' => 'width:15px')); }
</a> <a href="<?php echo createUrl('site/index'); ?> "> <button class="btn btn-primary btm pull-left" onclick="location.href='<?php echo $url2; ?> '">Back</button> </a> </div> </div> </div> </div> <div class="col-md-4"> <div class="col-md-11 col-md-offset-1"> <div class=""> <?php $img = isset($bannerImg->image) ? $bannerImg->image : ""; ?> <img width="100%" class="img-responsive" src="<?php echo getSiteUrl() . '/productimg/' . $img; ?> " /> </div> </div> </div> </div> </div>
/** * @brief 위젯의 실행 부분 * * ./widgets/위젯/conf/info.xml 에 선언한 extra_vars를 args로 받는다 * 결과를 만든후 print가 아니라 return 해주어야 한다 **/ function proc($args) { // 대상 모듈 (mid_list는 기존 위젯의 호환을 위해서 처리하는 루틴을 유지. module_srls로 위젯에서 변경) $oModuleModel =& getModel('module'); if ($args->mid_list) { $mid_list = explode(",", $args->mid_list); if (count($mid_list)) { $module_srls = $oModuleModel->getModuleSrlByMid($mid_list); if (count($module_srls)) { $args->module_srls = implode(',', $module_srls); } else { $args->module_srls = null; } } } // 글자 제목 길이 $widget_info->title_length = (int) $args->title_length; if (!$widget_info->title_length) { $widget_info->title_length = 10; } // 썸네일 생성 방법 $widget_info->thumbnail_type = $args->thumbnail_type; if (!$widget_info->thumbnail_type) { $widget_info->thumbnail_type = 'crop'; } // 썸네일 가로 크기 $widget_info->thumbnail_width = (int) $args->thumbnail_width; if (!$widget_info->thumbnail_width) { $widget_info->thumbnail_width = 100; } // 썸네일 세로 크기 $widget_info->thumbnail_height = (int) $args->thumbnail_height; if (!$widget_info->thumbnail_height) { $widget_info->thumbnail_height = 100; } // 세로 이미지 수 $widget_info->rows_list_count = (int) $args->rows_list_count; if (!$widget_info->rows_list_count) { $widget_info->rows_list_count = 1; } // 가로 이미지 수 $widget_info->cols_list_count = (int) $args->cols_list_count; if (!$widget_info->cols_list_count) { $widget_info->cols_list_count = 5; } // 노출 여부 체크 if ($args->display_author != 'Y') { $widget_info->display_author = 'N'; } else { $widget_info->display_author = 'Y'; } if ($args->display_regdate != 'Y') { $widget_info->display_regdate = 'N'; } else { $widget_info->display_regdate = 'Y'; } if ($args->display_readed_count != 'Y') { $widget_info->display_readed_count = 'N'; } else { $widget_info->display_readed_count = 'Y'; } if ($args->display_voted_count != 'Y') { $widget_info->display_voted_count = 'N'; } else { $widget_info->display_voted_count = 'Y'; } // 제목 $widget_info->title = $args->title; $oModuleModel =& getModel('module'); // 대상 모듈이 선택되어 있지 않으면 해당 사이트의 전체 모듈을 대상으로 함 $site_module_info = Context::get('site_module_info'); if ($args->module_srls) { $obj->module_srls = $args->module_srls; } else { if ($site_module_info) { $obj->site_srl = (int) $site_module_info->site_srl; } } $obj->direct_download = 'Y'; $obj->isvalid = 'Y'; // 정해진 모듈에서 문서별 파일 목록을 구함 $obj->list_count = $widget_info->rows_list_count * $widget_info->cols_list_count; $files_output = executeQueryArray("file.getOneFileInDocument", $obj); $files_count = count($files_output->data); $document_srl_list = array(); $document_list = array(); $oDocumentModel =& getModel('document'); if ($files_count > 0) { for ($i = 0; $i < $files_count; $i++) { $document_srl_list[] = $files_output->data[$i]->document_srl; } $tmp_document_list = $oDocumentModel->getDocuments($document_srl_list); if (count($tmp_document_list)) { foreach ($tmp_document_list as $val) { $document_list[] = $val; } } } $document_count = count($document_list); $total_count = $widget_info->rows_list_count * $widget_info->cols_list_count; for ($i = $document_count; $i < $total_count; $i++) { $document_list[] = new DocumentItem(); } $widget_info->document_list = $document_list; // 모듈이 하나만 선택되었을 경우 대상 모듈 이름과 링크를 생성 $module_srl = explode(',', $args->module_srls); if (count($module_srl) == 1) { $oModuleModel =& getModel('module'); $module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl[0]); if ($module_info->site_srl) { $site_info = $oModuleModel->getSiteInfo($module_info->site_srl); if ($site_info->domain) { $widget_info->more_link = getSiteUrl('http://' . $site_info->domain, '', 'mid', $module_info->mid); } } else { $widget_info->more_link = getUrl('', 'mid', $module_info->mid); } $widget_info->module_name = $module_info->mid; } Context::set('widget_info', $widget_info); // 템플릿의 스킨 경로를 지정 (skin, colorset에 따른 값을 설정) $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); Context::set('colorset', $args->colorset); // 템플릿 파일을 지정 $tpl_file = 'list'; // 템플릿 컴파일 $oTemplate =& TemplateHandler::getInstance(); $output = $oTemplate->compile($tpl_path, $tpl_file); return $output; }
?> <?php } ?> <?php if ($__Context->val->module_category_srl) { echo $__Context->module_category[$__Context->val->module_category_srl]->title; } ?> </td> <td><?php echo $__Context->val->mid; ?> </td> <td><a href="<?php echo getSiteUrl($__Context->val->domain, '', 'mid', $__Context->val->mid); ?> "><?php echo $__Context->val->browser_title; ?> </a></td> <td><?php echo zdate($__Context->val->regdate, "Y-m-d"); ?> </td> <td> <a href="<?php echo getUrl('act', 'dispBoardAdminBoardInfo', 'module_srl', $__Context->val->module_srl); ?> " class="x_icon-cog" title="<?php echo $__Context->lang->cmd_setup;
function _compile($args, $content_items) { $oTemplate =& TemplateHandler::getInstance(); // Set variables for widget $widget_info = new stdClass(); $widget_info->modules_info = $args->modules_info; $widget_info->option_view_arr = $args->option_view_arr; $widget_info->list_count = $args->list_count; $widget_info->page_count = $args->page_count; $widget_info->subject_cut_size = $args->subject_cut_size; $widget_info->content_cut_size = $args->content_cut_size; $widget_info->nickname_cut_size = $args->nickname_cut_size; $widget_info->new_window = $args->new_window; $widget_info->duration_new = $args->duration_new * 60 * 60; $widget_info->thumbnail_type = $args->thumbnail_type; $widget_info->thumbnail_width = $args->thumbnail_width; $widget_info->thumbnail_height = $args->thumbnail_height; $widget_info->cols_list_count = $args->cols_list_count; $widget_info->mid_lists = $args->mid_lists; $widget_info->show_browser_title = $args->show_browser_title; $widget_info->show_category = $args->show_category; $widget_info->show_comment_count = $args->show_comment_count; $widget_info->show_trackback_count = $args->show_trackback_count; $widget_info->show_icon = $args->show_icon; $widget_info->list_type = $args->list_type; $widget_info->tab_type = $args->tab_type; $widget_info->markup_type = $args->markup_type; // If it is a tab type, list up tab items and change key value(module_srl) to index if ($args->tab_type != 'none' && $args->tab_type) { $tab = array(); foreach ($args->mid_lists as $module_srl => $mid) { if (!is_array($content_items[$module_srl]) || !count($content_items[$module_srl])) { continue; } unset($tab_item); $tab_item = new stdClass(); $tab_item->title = $content_items[$module_srl][0]->getBrowserTitle(); $tab_item->content_items = $content_items[$module_srl]; $tab_item->domain = $content_items[$module_srl][0]->getDomain(); $tab_item->url = $content_items[$module_srl][0]->getContentsLink(); if (!$tab_item->url) { $tab_item->url = getSiteUrl($tab_item->domain, '', 'mid', $mid); } $tab[] = $tab_item; } $widget_info->tab = $tab; } else { $widget_info->content_items = $content_items; } unset($args->option_view_arr); unset($args->modules_info); Context::set('colorset', $args->colorset); Context::set('widget_info', $widget_info); $tpl_path = sprintf('%sskins/%s', $this->widget_path, $args->skin); return $oTemplate->compile($tpl_path, "content"); }
?> </p> </div> </div> </div> <?php } else { ?> <div class="col-lg-4" style="display: none;background:white; border-radius: 5px; position: absolute;" id="<?php echo $id; ?> "> <span class="close1 btn-right" style="margin: -10px -22px 0 0;">x</span> <div class="col-lg-12"> <img class="img-responsive" alt="" src="<?php echo getSiteUrl() . '/productimg/' . $product->pic; ?> "> <!--<img class="img-responsive" alt="" src="<?php echo $product->pic; ?> ">--> </div> <div class="col-lg-12"> <div class="infor"> <h3 class="pro-name"><?php echo $product->name; ?> </h3> <p class="descst"><?php echo $product->desc;
<?php /* @var $this UserController */ /* @var $model User */ /* @var $form CActiveForm */ //e($pdf1); //e($model->attributes); $js = " \n var pdf1 = " . json_encode($pdf1) . ";\n var pdf2 = " . json_encode($pdf2) . ";\n \n \$(document).ready(function(){\n \$('#type').click(function(){\n var val = \$('#type').val();\n console.log(val);\n if({$model->isNewRecord}) {\n if(val == 1) {\n// \$('#content').val(pdf1);\n window.parent.tinymce.get('content').setContent(pdf1)\n } else if(val == 2) {\n// \$('#content').val(pdf2);\n window.parent.tinymce.get('content').setContent(pdf2)\n }\n }\n });\n });\n"; Yii::app()->clientScript->registerScript('jq', $js, CClientScript::POS_END); Yii::app()->clientScript->registerCoreScript('jquery'); ?> <script src = "<?php echo getSiteUrl() . '/tiny_mce/tiny_mce.js'; ?> "></script> <script type="text/javascript"> tinyMCE.init({ mode: "textareas", theme: "advanced", extended_valid_elements: 'pre[*],script[*],style[*],tr,td', valid_children: "+body[style|script],pre[script|div|p|br|span|img|style|h1|h2|h3|h4|h5|tr|td],*[*]", valid_elements: '*[*]', cleanup_on_startup: false, trim_span_elements: false, verify_html: false, cleanup: false, convert_urls: false, }); </script> <div class="container"> <div class="row top30"> <div class="col-lg-10 col-lg-offset-1">
/** * Returns url for a specific declaration. * @param $declarationId the id of the declaration that the URL points to. * */ public function getDeclarationUrl($declarationId) { $declarationUrl = constructUrl(getSiteUrl(), array(), array('name' => $this->getNameForUrl(), 'exp' => 'person_declarations', 'decl_id' => $declarationId)); return $declarationUrl; }
function getRemoteFile($url, $fileExt) { $result = array(); $randName = random(32); $fileName = getRandDir() . $randName . $fileExt; $cookieFile = getRandDir() . $randName . '.txt'; $ch = curl_init($url); $fp = fopen($fileName, "wb"); curl_setopt($ch, CURLOPT_FILE, $fp); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 1); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_ENCODING, 'gzip,deflate'); curl_setopt($ch, CURLOPT_COOKIE, ''); curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); curl_setopt($ch, CURLOPT_REFERER, getSiteUrl()); curl_setopt($ch, CURLOPT_USERAGENT, '"Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)'); curl_setopt($ch, CURLOPT_TIMEOUT, 60); curl_exec($ch); curl_close($ch); fclose($fp); $result['imageurl'] = str_ireplace(S_ROOT, getSiteUrl(), $fileName); $result['imagepath'] = $fileName; $result['cookieurl'] = str_ireplace(S_ROOT, getSiteUrl(), $cookieFile); return $result; }
function dispTextyleMenu() { $menu = array(); $menu['Home'] = getFullSiteUrl($this->textyle->domain); $menu['Profile'] = getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleProfile'); $menu['Guestbook'] = getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextyleGuestbook'); //$menu['Tags'] = getSiteUrl($this->textyle->domain,'','mid',$this->module_info->mid,'act','dispTextyleTag'); $args->site_srl = $this->site_srl; $output = executeQueryArray('textyle.getExtraMenus', $args); if ($output->toBool() && $output->data) { foreach ($output->data as $v) { $menu[$v->name] = getUrl('', 'mid', $v->mid); } } $logged_info = Context::get('logged_info'); if ($logged_info->is_site_admin) { $menu['Write Post'] = getSiteUrl($this->textyle->domain, '', 'mid', $this->module_info->mid, 'act', 'dispTextylePostWrite'); } Context::set('menu', $menu); $this->setTemplateFile('menu'); }
if ($is_logged) { if ($logged_info->is_admin == "Y") { $is_admin = true; } else { $is_admin = false; } $group_srls = array_keys($logged_info->group_list); } else { $is_admin = false; $group_srls = array(); } $oContext->close(); ?> <root><node node_srl="66" parent_srl="0" menu_name_key='Welcome Page' text="<?php if (true) { $_names = array("en" => 'Welcome Page', "ko" => 'Welcome Page', "jp" => 'Welcome Page', "zh-CN" => 'Welcome Page', "zh-TW" => 'Welcome Page', "fr" => 'Welcome Page', "de" => 'Welcome Page', "ru" => 'Welcome Page', "es" => 'Welcome Page', "tr" => 'Welcome Page', "vi" => 'Welcome Page', "mn" => 'Welcome Page'); print $_names[$lang_type]; } ?> " url="<?php print true ? "page_SWVR48" : ""; ?> " href="<?php print true ? getSiteUrl('', '', 'mid', 'page_SWVR48') : ""; ?> " is_shortcut="N" open_window="N" expand="N" normal_btn="" hover_btn="" active_btn="" link="<?php if (true) { print $_names[$lang_type]; } ?> " /></root>
</div> </div> </div> </div> <div class="col-lg-6"> <div class="col-lg-12 replyTwo scroll"> <h4>Your menu choices </h4> <?php //echo "<pre>"; //print_r($items); foreach ($menus as $menu) { ?> <div class='col-lg-12'> <div class='col-lg-4'> <!--<img src='<?php echo getSiteUrl() . '/categoryimg/' . $menu['image']; ?> ' width='150px'>--> <img src='<?php echo $menu['image']; ?> ' width='150px'> </div> <div class='col-lg-8'> <div class='col-lg-12'><?php echo $menu['name']; ?> </div> <div class='col-lg-12'><?php echo $menu['desc']; ?>
// if ($hasany): ?> <div u="slides" style="cursor: move; position: absolute; left: 350px; top: 50px; width: 560px; height: 300px; overflow: hidden;"> <?php // endif; ?> <?php foreach ($offers->customOptions as $offer) { ?> <?php // if ($offer->active == 0) // continue; ?> <div> <img u=image src = "<?php echo getSiteUrl() . $offer->image; ?> " /> <div u="thumb"> <h4 class="opthead">Week <?php echo getWeekName($offer->week); ?> </h4> <p class="opttext"> <?php echo $offer->title; ?> </p> <p class="opttext"> <?php echo $offer->description;
<?php include_once "db.php"; include_once "dertyn.php"; $siteurl = getSiteUrl(); $tagline = getTagline(); $rewriteCheck = getrewriteCheck(); $id = $_GET['id']; $numEntries = getIndexNum(); $pagenum = 1; if ($rewriteCheck == 1) { $pid = getPid($id); } else { $pid = $id; } if ($id) { $subject = getSubject($pid); $title = "{$subject} - {$sitename}"; $description = getArticleDesc($pid); } else { $title = $sitename; } ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title><?php echo "{$title}"; ?>
function showDelform($id, $type) { echo "<p>Hey! Are you <b>SURE</b> you want to delete this entry?</p>"; $siteurl = getSiteUrl(); echo "<form action=\""; echo $_SERVER['PHP_SELF']; echo "\""; echo " method=\"post\">"; echo "<input type=\"hidden\" name=\"checksubmit\" value=\"1\">"; echo "<input type=\"hidden\" name=\"id\" value=\"{$id}\">"; echo "<input type=\"hidden\" name=\"type\" value=\"{$type}\">"; echo "<input type=\"submit\" name=\"submit\" value=\"YES\">"; echo " <a href=\"{$siteurl}\">no</a>"; echo "</form>"; }