public static function user_profile(Model_User $user, Tabs $tabs) { $pets = ORM::factory('User_Pet')->where('user_id', '=', $user->id)->order_by('active', 'desc')->find_all(); $tab = new Tab('Pets'); $tab->add_content(new Tab_PetList($user, $pets->as_array())); $tabs->add_tab($tab); }
/** * factory to create tabs * @param string $name * @return \Tabs */ public function createComponentTabs($name) { $tabs = new \Tabs($this, $name); $tabs->setup("TabsData"); $tabs->addItems(); return $tabs; }
/** * View users profile */ public function action_index() { $id = $this->request->param('id'); $user = ORM::factory('User', $id); if (!$user->loaded()) { throw HTTP_Exception::Factory('404', 'No such user'); } $container = new Tabs(); $about = new Tab('About me'); $about->add_content(new Tab_Text($user->get_property('about'))); $about->add_content(new Tab_Text($user->get_property('signature'))); $container->add_tab($about); Event::fire('user.profile_tabs', array($user, $container)); $this->view = new View_User_Profile(); $this->view->user = $user; $this->view->tabs = $container->render(); /* // @TODO, This belongs to the pet module, better to use events? $pets = ORM::factory('User_Pet') ->where('user_id', '=', $user->id) ->order_by('active', 'desc'); $paginate = Paginate::factory($pets) ->execute(); $this->view = new View_User_Profile; $this->view->pagination = $paginate->render(); $this->view->profile_user = $user; // $this->view->pets = ORM::factory('User_Pet')->where('user_id', '=', $user->id)->order_by('active', 'desc')->find_all()->as_array(); $this->view->pets = $paginate->result(); */ }
/** * factory to create tabs * @param string $name * @return \Tabs */ public function createComponentTabs($name) { $remoteNodes = $this->remoteNodes->getTable()->where("NOT group", "local"); $tabs = new \Tabs($this, $name); $tabs->setup(); $actualPresenter = $this->getPresenter(); $actualParameters = $actualPresenter->getParameters(); if ($this->isLocal) { $tabs->addItem(_("LOCAL DATABASE"), "Data", "Browser", "default", "data", false); } else { $tabs->addItem(_("LOCAL DATABASE"), "Data", "Browser", "default", "data", true); } foreach ($remoteNodes as $number => $row) { if (array_key_exists("remoteAet", $actualParameters) and $actualParameters["remoteAet"] == $row["aet"]) { $tabs->addItem($row["name"], "Data", "Browser", "default", "data", false, $row["aet"]); } else { $tabs->addItem($row["name"], "Data", "Browser", "default", "data", true, $row["aet"]); } } return $tabs; }
public static function loadWidgetSpace($userId, $widgetSpaceFile) { $pathToWidgetSpace = WIDGET_SPACE_PATH . $widgetSpaceFile; if (file_exists($pathToWidgetSpace)) { # Try to load the widget space $doc = new DOMDocument('1.0', 'utf-8'); $doc->formatOutput = true; $doc->preserveWhiteSpace = false; # Get all tabs $doc->load($pathToWidgetSpace); $xmlTabs = $doc->getElementsByTagName('tabs'); foreach ($xmlTabs as $tabs) { $tabTitle = $tabs->getAttribute('title'); # Maybe this tab name already exist $tabTitle = Tabs::getNewTabName($userId, $tabTitle); # Import the tab Tabs::addTab($userId, $tabTitle); # Get the tab layout type $xmlLayout = $tabs->getElementsByTagName('layout'); if ($xmlLayout->length > 0) { $layoutType = $xmlLayout->item(0)->getAttribute('type'); switch ($layoutType) { case 'three_col_layout': self::loadThreeColLayout($userId, $tabTitle, $xmlLayout->item(0)); break; default: throw new MwwException(MwwException::MODEL, 'WidgetSapce::loadWidgetSpace / The layout ' . $layoutType . ' is not supported'); } } else { continue; } } } else { throw new MwwException(MwwException::MODEL, 'WidgetSapce::loadWidgetSpace / The file ' . $widgetSpaceFile . ' doesn\'t exists'); } }
/** * @param string $filename * @return string */ public static function getTabUrl($filename) { return Tabs::getTabUrl($filename); }
if ($member->getDisplaySettings()->hasLabel('CALENDAR_TITLE')) { $titleField = $member->getName(); } } } } } } $reqDao = $table . "Dao"; $dao = new $reqDao(); $objs = $dao->getAll(); if (!is_null($objs) && $objs != -1) { foreach ($objs as $obj) { $titleMethod = 'get' . $titleField; $startMethod = 'get' . $startField; $tempEntry = array('id' => $obj->getPk(), 'title' => $obj->{$titleMethod}(), 'start' => $obj->{$startMethod}(), 'url' => Tabs::viewInNewTabJs('Update', $table, $obj->getPk(), WebContext::getLanguage()->get($table) . ' ' . $obj->getPk())); if ($endField != NULL) { $endMethod = 'get' . $endField; $tempEntry['end'] = $obj->{$endMethod}(); } $tempClassName = 'cal-' . $def->getTable()->name; if ($completeField != NULL) { $completeMethod = 'get' . $completeField(); if ($obj->{$completeMethod}()) { $tempClassName .= ' jack-cal-complete'; $tempEntry['title'] = 'COMPLETE:' . $tempEntry['title']; } else { $tempClassName .= ' jack-cal-incomplete'; $tempEntry['title'] = 'PENDING: ' . $tempEntry['title']; } }
public static function updatePositions($positions) { $userId = Auth::getUserId(); Tabs::updatePositions($userId, $positions); exit(0); }
public static function viewInNewTab($pkg, $call, $id, $linkText, $tabTitle) { return '<a href="" ' . 'onclick="' . Tabs::viewInNewTabJs($action, $object, $id, $tabTitle) . ' return false;">' . $linkText . '</a>'; }
$third_tab_content .= ' var options = {}; options["dataMode"] = "regions"; options["width"] = "675px"; options["showLegend"] = true; var container = document.getElementById("map_canvas"); var geomap = new google.visualization.GeoMap(container); geomap.draw(data, options); }; </script> <div id="map_canvas" style="padding:1px 10px; 1px 10px;"></div> '; } } $tabs = new Tabs(1, 'xp', TABS_DIR, '?admin=mod_payments_statistics'); //$tabs->SetHttpVars(array('admin')); $tab1 = $tabs->AddTab(_ORDERS . ' (' . _AMOUNT . ')', $first_tab_content); $tab2 = $tabs->AddTab(_ORDERS . ' (' . _INCOME . ')', $second_tab_content); $tab3 = $tabs->AddTab(_ORDERS . ' (' . _MAP_OVERLAY . ')', $third_tab_content); ## +---------------------------------------------------------------------------+ ## | 2. Customizing: | ## +---------------------------------------------------------------------------+ ## *** set container's width in pixels (px), inches (in) or points (pt) $tabs->SetWidth('696px'); ## *** set container's height in pixels (px), inches (in) or points (pt) $tabs->SetHeight('auto'); // 'auto' ## *** set alignment inside the container (left, center or right) $tabs->SetAlign('left'); ## *** set container's color in RGB format or using standard names
</td> </tr> <tr> <td style="padding-left:5px;" colspan="3"><input class="form_button" type="submit" name="btnSubmit" value="' . _BUTTON_CHANGE . '"></td> </tr> </table> </form>'; } } } } } } } } $tabs = new Tabs(1, 'xp', TABS_DIR, '?admin=settings'); //$tabs->SetHttpVars(array('admin')); $tab1 = $tabs->AddTab(_GENERAL_SETTINGS, $tab_content_1); $tab2 = $tabs->AddTab(_VISUAL_SETTINGS, $tab_content_2); $tab3 = $tabs->AddTab(_DATETIME_PRICE_FORMAT, $tab_content_3); $tab4 = $tabs->AddTab(_EMAIL_SETTINGS, $tab_content_4); $tab5 = $tabs->AddTab(_TEMPLATES_STYLES, $tab_content_5); $tab6 = $tabs->AddTab(_SERVER_INFO, $tab_content_6); $tab7 = $tabs->AddTab(_SITE_INFO, $tab_content_7); $tab8 = $tabs->AddTab(_CRON_JOBS, $tab_content_8); ## +---------------------------------------------------------------------------+ ## | 2. Customizing: | ## +---------------------------------------------------------------------------+ ## *** set container's width in pixels (px), inches (in) or points (pt) $tabs->SetWidth('100%'); ## *** set container's height in pixels (px), inches (in) or points (pt)
<?php /** * Created by Kent M. Patrick * Project: BPU * Company: Fingerprints Ltd * Date: 21/09/2016 * Time: 9:58 AM */ require_once 'header.php'; $tabs = new Tabs(); $table = new Tables(); $users = $db->select("users"); $marker = date('Y-m-d G:i:s', mktime(0, 0, 0, date("m"), date("d") + 1, date("Y"))); $date['day'] = date('Y-m-d G:i:s', mktime(0, 0, 0, date("m"), date("d"), date("Y"))); $date['week'] = date('Y-m-d G:i:s', mktime(0, 0, 0, date("m"), date("d") - 7, date("Y"))); $date['month'] = date('Y-m-d G:i:s', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); foreach ($date as $tk => $td) { $products[$tk] = $db->time_range("products", $td, $marker); $count[$tk]['exported'] = 0; if ($products[$tk]) { foreach ($products[$tk] as $product) { if ($product['exported']) { $count[$tk]['exported']++; } } } $count[$tk]['created'] = $products[$tk] ? count($products[$tk]) : '0'; } $tabs->start(); $tabs->start("buttons", "pills");
/** * Tabs getter Function * @see skip_tabs() * @ignore */ function get_tabs($elements, $args = array(), $return = 'html') { $tabs = new Tabs($args); if (count($elements) > 0) { foreach ($elements as $element) { $tabs->add_element($element['title'], $element['content'], array_key_exists('args', $element) ? $element['args'] : array()); } } else { return FALSE; } return element_return($tabs, $return); }
public function createExamples($ind) { $table_box = new Table(); $table_box->setWidth(250)->setDefaultAlign(RowTable::ALIGN_LEFT); $table_box->addRow(); $body_obj = new Object(); $body_obj->setAlign(Object::ALIGN_CENTER); //->setId("id_body_obj")->setStyle("padding:5px;background:".$this->background_body->getValue().";"); $text_obj = new Object(__(TEXT_ON_BODY)); $body_obj->add($text_obj->setId("id_body_text"), "<br/>"); $link_obj = new Object(new Link("javascript:void(0);", Link::TARGET_BLANK, __(LINK_ON_BODY))); $body_obj->add($link_obj->setId("id_body_link"), "<br/>"); $body_obj->add($this->text_link_note_obj, "<br/>"); $table_box->addRow($body_obj); $table_box->addRow(); $table_box->addRow(); $button_1 = new Button($this); $button_1->setWidth(245); $table_box->addRow($button_1->setValue("Button [style jquery]")); $table_box->addRow(); $tabs = new Tabs("tab-sample"); $tabs->addTab("Tab1", ""); $tabs->addTab("Tab2", ""); $tabs->addTab("Tab3", ""); $table_box->addRow($tabs); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $dialogbox = new DialogBox(__(DIALOGBOX_TITLE), __(DIALOGBOX_CONTENT)); $dialogbox->setWidth(245)->activateOneInstance()->setPosition(""); $dialogbox_link = new Object(new Link($dialogbox, Link::TARGET_NONE, __(VIEW_DIALOGBOX))); $table_box->addRow($dialogbox_link->setId("id_dialogbox_link")); $dialogbox->setPositionX("\$('#" . $dialogbox_link->getId() . "').position().left-f_scrollLeft()"); $dialogbox->setPositionY("\$('#" . $dialogbox_link->getId() . "').position().top-f_scrollTop()-70"); $this->addObject(clone $dialogbox); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $table_box->addRow(); $style1_box_text = new Box("text", false, $this->current_style_val, $this->current_style_val, "", "box_text_" . $this->current_style_val, 245); if ($this->background_picture_1->getValue() != "") { $style1_box_text->forceBoxWithPicture(true, $this->border_table_1->getValue()); } else { $style1_box_text->forceBoxWithPicture(false); } $table_box->addRow($style1_box_text->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]")); $style1_box = new Box("link", false, $this->current_style_val, $this->current_style_val, "javascript:void(0);", "box_" . $this->current_style_val, 245); if ($this->background_picture_1->getValue() != "") { $style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue()); } else { $style1_box->forceBoxWithPicture(false); } $style1_box->setShadow(true); $table_box->addRow($style1_box->setContent("Box Object [<a href=\"javascript:void(0);\">style " . $this->current_style_val . "</a>]")); $style1_box = new RoundBox($this->current_style_val, "round_box_" . $this->current_style_val, 245); $style1_box->setShadow(true); if ($this->background_picture_1->getValue() != "") { $style1_box->forceBoxWithPicture(true, $this->border_table_1->getValue()); } else { $style1_box->forceBoxWithPicture(false); } $table_box->addRow($style1_box->setContent("RoundBox Object<br/>[style " . $this->current_style_val . "]")); $table_box->addRow(); if (!defined('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val)) { define('DEFINE_STYLE_BORDER_TABLE_' . $this->current_style_val, $this->border_table_1->getValue()); } $table = new Table(); $table->setId("table_sample")->setWidth(245); $table->addRowColumns("header1", "header2", "header3")->setHeaderClass($this->current_style_val); $table->addRowColumns("cel 1-1", "cel 1-2", "cel 1-3")->setId("table_tr_sample")->setBorderPredefinedStyle($this->current_style_val)->setAlign(RowTable::ALIGN_CENTER); $table_box->addRow($table); return $table_box; }
public function postArticleAction() { try { if (!isset($_POST['id'])) { throw new Exception("Error Processing Request [10]"); } $id = (int) Arr::get($_POST, 'id', null); if (empty($id)) { $model = new Wintness(); } else { $model = Wintness::find($id); if ($model == null) { throw new Exception("Error Processing Request [11]"); } } // collect image uploader /* * (array) currentList * (string) competeKey * (array) newList * (string) deleteFieldName */ $delImages = Arr::get($_POST, 'deleteImages', array()); $delLength = sizeof($delImages); for ($i = 0; $i < $delLength; $i++) { $delLength[$i] = basename($delLength); } $imgUploaderList = array('cover' => array('fieldName' => 'cover', 'items' => null), 'before' => array('fieldName' => 'img_before', 'items' => null), 'after' => array('fieldName' => 'img_after', 'items' => null), 'gallery' => array('fieldName' => 'gallery', 'items' => null)); foreach ($imgUploaderList as $key => $val) { $imgs = json_decode($model->{$val}['fieldName']); if (!empty($imgs) && sizeof($imgs) > 0) { foreach ($imgs as $img) { if ($delLength > 0 && in_array($img->id, $delImages)) { fps::getInstance()->delete($img->image); } } } $list = array(); $descFieldName = $val['fieldName'] . '_desc'; $imagesDesc = Input::get($descFieldName, array()); $images = Input::get($val['fieldName'], array()); foreach ($images as $idx => $image) { $list[] = array('id' => basename($image), 'image' => $image, 'text' => $imagesDesc[$idx]); } $imgUploaderList[$key]['items'] = $list; } $status = (int) Arr::get($_POST, 'status', 0); $isInSiderbar = (int) Arr::get($_POST, 'isInSiderbar', 0); $model->title = Input::get('title'); $model->background_color = Input::get('background_color', '#ccc'); $model->cover = json_encode($imgUploaderList['cover']['items']); $model->img_before = json_encode($imgUploaderList['before']['items']); $model->img_after = json_encode($imgUploaderList['after']['items']); $model->description = Input::get('description', ''); $model->gallery = json_encode($imgUploaderList['gallery']['items']); $model->status = $status % 2; $model->isInSiderbar = $isInSiderbar % 2; $model->created_at = time(); $model->updated_at = time(); $model->save(); WintnessLabels::where('wid', '=', $model->id)->delete(); $types = array('service', 'faq'); foreach ($types as $type) { $fieldName = 'label_' . $type; $labels = Input::get($fieldName, array()); foreach ($labels as $label) { WintnessLabels::create(array('wid' => (int) $model->id, 'label_id' => (int) $label)); } } Tabs::where('type', '=', 'wintness')->where('item_id', '=', $model->id)->delete(); // collect tabs $tabContents = Input::get('tabContents', array()); $tabs = array(); $tabName = Input::get('tabName', array()); $order = 1; foreach ($tabName as $key => $tab) { if (!isset($tabContents[$key])) { continue; } else { Tabs::create(array('type' => 'wintness', 'item_id' => $model->id, 'title' => $tab, 'content' => $tabContents[$key], 'sort' => $order++)); } } return Redirect::route('admin.wintness.article.list', array('page' => 1, 'message' => 'success')); } catch (Exception $e) { return Redirect::back()->withInput()->withErrors($e->getMessage()); } }
public static function editTab($userId, $title, $oldTitle) { // Verify if the tab name doesn't exist $tabNameExist = true; $userTabs = Tabs::retrieveTabs($userId, 'raw'); foreach ($userTabs as $tab) { if ($tab['title'] == $title && $tab['title'] != $oldTitle) { return 0; } } $db = DbUtil::accessFactory(); $title = $db->escape($title); $oldTitle = $db->escape($oldTitle); // Change name in "tabs" table $query = "UPDATE tabs SET title = '{$title}' WHERE title = '{$oldTitle}' AND userid = '{$userId}' "; if (!$db->execute($query)) { throw new DBException(MwwException::MODEL, "Unable to edit the '{$name}' tabs in the persistant database (tab)."); } // Change name in "interface" table // TODO: Use a transaction here $query = "UPDATE interface SET tab = '{$title}' WHERE userid = '{$userId}' "; if (!$db->execute($query)) { throw new DBException(MwwException::MODEL, "Unable to edit the '{$name}' tabs in the persistant database (interface)."); } return 1; }
public function getArticle($id = 0) { try { if (empty($id)) { throw new \Exception("Error request [10]"); } $model = \Wintness::where('status', '=', '1')->find($id); if (empty($model)) { throw new \Exception('Error request [11]'); } $list = array('cover' => array('fieldName' => 'cover', 'items' => array()), 'before' => array('fieldName' => 'img_before', 'items' => array()), 'after' => array('fieldName' => 'img_after', 'items' => array()), 'gallery' => array('fieldName' => 'gallery', 'items' => array())); foreach ($list as $key => $val) { $bool = $key == 'gallery' || $key == 'tabs' ? false : true; $list[$key]['items'] = json_decode($model->{$val}['fieldName'], $bool); } $labels = array(); $rows = \WintnessLabels::where('wid', '=', $model->id)->lists('label_id'); if (!empty($rows)) { $labels = $rows; } $labelList = array('service' => array(), 'faq' => array()); $rows = \ServiceFaq::where('status', '=', 'Y')->orderBy('_parent', 'desc')->orderBy('sort', 'desc')->orderBy('updated_at', 'desc')->findMany($labels, array('id', 'title', 'type')); if (!empty($rows)) { foreach ($rows as $row) { $labelList[$row->type][] = array('id' => $row->id, 'title' => $row->title); } } // find prev and next $prev = \Wintness::where('status', '=', '1')->where('sort', '>=', $model->sort)->where('updated_at', '>', $model->updated_at)->first(array('id', 'title')); $next = \Wintness::where('status', '=', '1')->where('sort', '<=', $model->sort)->where('updated_at', '<', $model->updated_at)->first(array('id', 'title')); // read service $servicefaq = \ServiceFaq::where('status', '=', 'Y')->orderBy('type', 'asc')->orderBy('_parent', 'desc')->orderBy('sort', 'desc')->orderBy('updated_at', 'desc')->get(array('id', 'title', '_parent', 'type')); $servicesFaqs = array('service' => array(), 'faq' => array()); foreach ($servicefaq as $item) { $key = $item->id; $parent = $item->_parent; $items = $servicesFaqs[$item->type]; if ($parent == 'N') { if (!isset($items[$key])) { $items[$key] = array('id' => $key, 'title' => $item->title, 'subItems' => array()); } } else { $items[$parent]['subItems'][] = array('id' => $key, 'title' => $item->title); } $servicesFaqs[$item->type] = $items; } $tabs = \Tabs::where('type', '=', 'wintness')->where('item_id', '=', $model->id)->orderBy('sort', 'desc')->get(array('title', 'content')); return \View::make('aesthetics.wintness.view_article', array('bodyId' => 'casePost', 'labelList' => &$labelList, 'list' => &$list, 'model' => &$model, 'prev' => $prev, 'next' => $next, 'servicesFaqs' => &$servicesFaqs, 'tabs' => &$tabs)); } catch (Exception $e) { return \Redirect::route('frontend.wintness.index'); } }
// 4. IPN Monitor settings if ($enable_ipn == '2') { if ($monitor_clean_shop_days == "" || $monitor_clean_shop_days == NULL || $monitor_clean_shop_days == 0) { $monitor_clean_shop_days = 3; } // Default is 3 days if ($monitor_clean_check_days == "" || $monitor_clean_check_days == NULL || $monitor_clean_check_days == 0) { $monitor_clean_check_days = 7; } // Default is 7 days $text4 .= "\n\t\t<table>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_95 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='3' type='text' name='monitor_clean_shop_days' value='{$monitor_clean_shop_days}' />\n\t\t\t</td>\n\t\t</tr>\n\t\t<tr>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t" . EASYSHOP_GENPREF_96 . "\n\t\t\t\t</span>\n\t\t\t</td>\n\t\t\t<td class='tborder' style='width: 200px'>\n\t\t\t\t<input class='tbox' size='3' type='text' name='monitor_clean_check_days' value='{$monitor_clean_check_days}' />\n\t\t\t</td>\n\t\t</tr>\t\t\n\t\t</table>\n\t\t"; } // 5. Presentation settings $text5 .= "\n\t\t\t\t\t\t<table border='0' cellspacing='15' width='100%'>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_GENPREF_98 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_main_category_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_main_category_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_main_category_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_main_category_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_main_category_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_main_category_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_GENPREF_99 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='main_categories_per_page' value='{$main_categories_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n <td><hr/></td>\n </tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_11 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_category_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_category_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_category_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_category_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_category_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_category_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CAT_12 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='categories_per_page' value='{$categories_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n <td><hr/></td>\n </tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CONF_ITM_02 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<select class='tbox' name='num_item_columns'>\n\t\t\t\t\t\t\t\t\t\t<option value='1' " . ($num_item_columns == 1 ? "selected='selected'" : "") . ">1</option>\n\t\t\t\t\t\t\t\t\t\t<option value='2' " . ($num_item_columns == 2 ? "selected='selected'" : "") . ">2</option>\n\t\t\t\t\t\t\t\t\t\t<option value='3' " . ($num_item_columns == 3 ? "selected='selected'" : "") . ">3</option>\n\t\t\t\t\t\t\t\t\t\t<option value='4' " . ($num_item_columns == 4 ? "selected='selected'" : "") . ">4</option>\n\t\t\t\t\t\t\t\t\t\t<option value='5' " . ($num_item_columns == 5 ? "selected='selected'" : "") . ">5</option>\n\t\t\t\t\t\t\t\t\t</select>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 45%'>\n\t\t\t\t\t\t\t\t\t<span class='smalltext' style='font-weight: bold'>\n\t\t\t\t\t\t\t\t\t\t" . EASYSHOP_CONF_ITM_03 . "\n\t\t\t\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class='tborder' style='width: 55%'>\n\t\t\t\t\t\t\t\t\t<input class='tbox' size='3' type='text' name='items_per_page' value='{$items_per_page}' />\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t</table>\n"; // Run the form with tabs $tabs = new Tabs("easyshop_preferences"); $tabs->start(EASYSHOP_GENPREF_01); echo $text1; // Shop contact info $tabs->end(); $tabs->start(EASYSHOP_GENPREF_44); echo $text2; // Settings $tabs->end(); $tabs->start(EASYSHOP_GENPREF_14); echo $text3; // PayPal Info $tabs->end(); if ($enable_ipn == '2') { $tabs->start(EASYSHOP_GENPREF_94); echo $text4;
case 'Touch': define('INIT_FACTOR', 3); break; case 'Basic': define('INIT_FACTOR', 2); break; } CacheIMS::init(); // set bbox extent //set the offset parameter define('MOVE_FACTOR', 0.40); $selectvalue = $_REQUEST['selectvalues']; $tabs = new Tabs(selfURL(), "tab", array("Map", "Photo", "What's Here")); if(!photoURL()) { $tabs->hide("Photo"); } $data = Buildings::bldg_info($selectvalue); $whats_here = whats_here($data); $anything_here = (count($whats_here) > 0); $snippets = snippets($data); if(!$anything_here) { $tabs->hide("What's Here"); } $tabs_html = $tabs->html($page->branch);
public function report() { $errors = count($this->errors['sku']) + count($this->errors['name']); $success = count($this->products) - $errors; $tab = new Tabs(); $report = new Report(); $tab->start(); $tab->start("buttons"); $tab->button("info", false, true); $success > 0 ? $tab->button("success", $success) : $tab->button("success"); $errors > 0 ? $tab->button("errors", $errors) : $tab->button("errors"); $tab->end("buttons"); $tab->start("entries"); $tab->entry("info", true); $report->start("import data"); $report->entry("info", "info", "Products to be added: " . count($this->products)); $report->entry($errors > 0 ? "warning" : "success", $errors > 0 ? "warning" : "success", "Products added: {$success}"); $report->entry($errors > 0 ? "warning" : "info", $errors > 0 ? "warning" : "info", "Errors: {$errors}"); $report->entry("info", "info", "Clearing parsed data and import file"); if (unlink($_SESSION['upload_file'])) { unset($_SESSION['upload_file']); unset($_SESSION['products']); $report->entry("success", "success", "Cleared parsed data"); } if ($errors == 0) { $report->entry("success", "success", "Import completed without errors"); } else { $report->entry("warning", "warning", "Import completed with errors please review"); } $report->end(); $tab->entry("end"); $tab->entry("success"); $report->start("Successful product creation"); foreach ($this->products as $key => $product) { if (!in_array($product['sku'], $this->errors['sku']) && !in_array($product['name'], $this->errors['name'])) { $report->entry("success", "product: {$key}", "Added: " . $product['name']); } } if ($success == 0) { $report->entry("info", "info", "No products we're added"); } $report->end(); $tab->entry("end"); $tab->entry("errors"); if (count($this->errors['sku']) > 0) { $report->start("Sku duplicates"); foreach ($this->products as $key => $product) { if (in_array($product['sku'], $this->errors['sku'])) { $report->entry("warning", "product: {$key}", "Failed to add product: " . $product['name'] . "<br />Due to duplicated sku: " . $product['sku'] . "<br/>Existing product: " . $this->duplicates[$product['sku']]); } } $report->end(); } if (count($this->errors['name']) > 0) { $report->start("Name duplicates"); foreach ($this->products as $key => $product) { if (in_array($product['name'], $this->errors['name'])) { $report->entry("warning", "product: {$key}", "Failed to add product: " . $product['name'] . "<br />Due to not having a valid sku and provided name already exists<br/>Existing product: " . $product['sku']); } } $report->end(); } if ($errors == 0) { $report->start("Import errors"); $report->entry("info", "info", "No products have errors"); $report->end(); } $tab->entry("end"); $tab->end("entries"); $tab->end(); }
<?php foreach ($dashboard_groups as $dashboard_group_title => $dashboards) { ?> <td width='20%'> <div class='index-group-title'><?php echo $dashboard_group_title; ?> </div> <ul style='margin: 0; padding-left: 20px;'> <?php foreach ($dashboards as $name => $url) { ?> <?php $link_title = Tabs::getLinkTitle($name, $url); $link_target = Tabs::getLinkTarget($url); $link_image = Tabs::getLinkIcon($url); ?> <li><a href='<?php echo $url; ?> ' <?php echo $link_target; ?> title='<?php echo $link_title; ?> '><span><?php echo $link_title; echo $link_image; ?> </span></a></li>
if ($result[1] >= 0) { $third_tab_content .= draw_set_values($result[0], $chart_type, _LOGINS); } $third_tab_content .= ' } </script>'; $third_tab_content .= '<script type="text/javascript">'; $third_tab_content .= $nl . ' google.load(\'visualization\', \'1\', {packages: [\'' . $chart_type . '\']});'; $third_tab_content .= $nl . ' google.setOnLoadCallback(drawVisualization);'; $third_tab_content .= $nl . ' function frmStatistics_Submit() { document.frmStatistics.submit(); }'; $third_tab_content .= '</script>'; $third_tab_content .= get_chart_changer('1_3', $chart_type, $year); $third_tab_content .= '<div id="div_visualization" style="width:600px;height:310px;"> <img src="images/loading.gif" style="margin:100px auto;" alt="" /></div>'; } } } $tabs = new Tabs(1, 'xp', TABS_DIR, '?admin=statistics'); //$tabs->SetHttpVars(array('admin')); $tab1 = $tabs->AddTab(_CUSTOMERS . ' (' . _MAP_OVERLAY . ')', $first_tab_content); $tab2 = $tabs->AddTab(_CUSTOMERS . ' (' . _REGISTRATIONS . ')', $second_tab_content); $tab3 = $tabs->AddTab(_CUSTOMERS . ' (' . _LOGINS . ')', $third_tab_content); ## +---------------------------------------------------------------------------+ ## | 2. Customizing: | ## +---------------------------------------------------------------------------+ ## *** set container's width in pixels (px), inches (in) or points (pt) $tabs->SetWidth('696px'); ## *** set container's height in pixels (px), inches (in) or points (pt) $tabs->SetHeight('auto'); // 'auto' ## *** set alignment inside the container (left, center or right) $tabs->SetAlign('left'); ## *** set container's color in RGB format or using standard names
<?php namespace TokenToMe\TwitterCards\Admin; if (!defined('JM_TC_VERSION')) { header('Status: 403 Forbidden'); header('HTTP/1.1 403 Forbidden'); exit; } ?> <div class="wrap"> <h1 class="page-title-action">JM Twitter Cards : <?php echo esc_html(get_admin_page_title()); ?> </h1> <?php echo Tabs::admin_tabs(); ?> <?php $author = new Author(); //plugin list $slugs = array('jm-wp-cookie-bar' => 'JM WP Cookie Bar'); $author->get_author_infos('Julien Maury', __('I am a WordPress Developer, I like to make it simple.', JM_TC_TEXTDOMAIN), '*****@*****.**', 'http://tweetpressfr.github.io', '7BJYYT486HEH6', 'tweetpressfr', 'https://plus.google.com/u/0/+JulienMaury', $slugs); ?> </div> <?php
<?php $docRoot = getenv("DOCUMENT_ROOT"); require_once $docRoot . "/mobi-config/mobi_web_constants.php"; require_once WEBROOT . "page_builder/page_header.php"; require_once LIBDIR . "StellarData.php"; require_once WEBROOT . "stellar/stellar_lib.php"; $class_id = $_REQUEST['id']; $class = StellarData::get_subject_info($class_id); $term = StellarData::get_term_text(); $term_id = StellarData::get_term(); $tabs = new Tabs(selfURL(), 'tab', array('News', 'Info', 'Staff')); $back = $_REQUEST['back']; /* My Stellar actions */ $mystellar = getMyStellar()->allTags; $class_data = $class_id . " " . $term_id; if(in_array($class_data, $mystellar)) { $toggle = "ms_on"; $mystellar_img = 'mystellar-on'; $action = 'remove'; } elseif (!in_array($class_data, $mystellar)) { $toggle = "ms_off"; $mystellar_img = 'mystellar-off'; $action = 'add'; }
return moveURL(long(), lat(), $zoom, maptype()); } function mapTypeURL($type) { return moveURL(long(), lat(), zoom(), $type); } function selfURL() { return moveURL(long(), lat(), zoom(), maptype()); } function moveURL($long, $lat, $zoom, $maptype) { $params = array("zoom" => $zoom, "long" => $long, "lat" => $lat, "maptype" => $maptype, "loc" => (int) $_REQUEST['loc']); return "detail.php?" . http_build_query($params); } $tabs = new Tabs(selfURL(), "tab", array("Map")); $tabs_html = $tabs->html(); $tab = $tabs->active(); $tab = tab(); $width = pix("x", $phone); $height = pix("y", $phone); $parent = false; if ($_REQUEST['loc']) { $db = new db(); $stmt = $db->connection->prepare("SELECT * FROM Buildings WHERE id = " . $_REQUEST['loc']); $stmt->execute(); $data = $stmt->fetchAll(); } if ($data[0]['parent'] != '') { $db = new db(); $stmt_1 = $db->connection->prepare("SELECT * FROM Buildings WHERE id = " . $data[0]['parent']);
public function Load() { parent::$PAGE_TITLE = __(CONFIGURE_SITE); // Admin $this->form = new Form($this); $table_form = new Table(); $table_form->addRow(); $this->edtName = new TextBox($this->form, "edtName"); $this->edtName->setValue(__(SITE_NAME))->setWidth(300); $this->edtName->onChange("changeSiteName")->setAjaxEvent()->disableAjaxWaitMessage(); $edtValidation = new LiveValidation(); $table_form->addRowColumns(__(EDT_NAME) . ": ", $this->edtName->setLiveValidation($edtValidation->addValidatePresence()->setFieldName(__(EDT_NAME)))); $this->edtDesc = new Editor($this->form, "edtDesc"); $this->edtDesc->setValue(__(SITE_DESC)); $this->edtDesc->setToolbar(Editor::TOOLBAR_NONE)->setWidth(290)->setHeight(100); $edtValidation = new LiveValidation(); $table_form->addRowColumns(__(EDT_DESC) . ": ", $this->edtDesc->setLiveValidation($edtValidation->addValidatePresence()->setFieldName(__(EDT_DESC)))); $this->edtKey = new TextBox($this->form, "edtKey"); $this->edtKey->setValue(__(SITE_KEYS))->setWidth(300); $edtValidation = new LiveValidation(); $table_form->addRowColumns(__(EDT_KEY) . ": ", $this->edtKey->setLiveValidation($edtValidation->addValidatePresence()->setFieldName(__(EDT_KEY)))); $table_form->addRow(); $this->cmbRating = new ComboBox($this->form, "cmbRating"); $this->cmbRating->addItem("general", "general", SITE_RATING == "general" ? true : false)->addItem("mature", "mature", SITE_RATING == "mature" ? true : false)->addItem("restricted", "restricted", SITE_RATING == "restricted" ? true : false)->addItem("14years", "14years", SITE_RATING == "14years" ? true : false)->setWidth(143); $table_form->addRowColumns(__(CMB_RATING) . ": ", $this->cmbRating); $this->edtAuthor = new TextBox($this->form, "edtAuthor"); $this->edtAuthor->setValue(__(SITE_AUTHOR)); $edtValidation = new LiveValidation(); $table_form->addRowColumns(__(EDT_AUTHOR) . ": ", $this->edtAuthor->setLiveValidation($edtValidation->addValidatePresence()->setFieldName(__(EDT_AUTHOR)))); $this->cmbLanguage = new ComboBox($this->form, "cmbLanguage"); $this->cmbLanguage->addItem("en", __(ENGLISH), SITE_DEFAULT_LANG == "en" ? true : false, "wsp/img/lang/en.png")->addItem("fr", __(FRENCH), SITE_DEFAULT_LANG == "fr" ? true : false, "wsp/img/lang/fr.png"); //->addItem("de", __(GERMAN), (SITE_DEFAULT_LANG=="de")?true:false, "wsp/img/lang/de.png")->addItem("es", __(SPANISH), (SITE_DEFAULT_LANG=="es")?true:false, "wsp/img/lang/es.png") $this->cmbLanguage->setWidth(143); $table_form->addRowColumns(__(CMB_LANGUAGE) . ": ", $this->cmbLanguage); $table_form->addRow(); $this->cmbSiteType = new ComboBox($this->form, "cmbSiteType"); $this->cmbSiteType->addItem("", " ", SITE_META_OPENGRAPH_TYPE == "" ? true : false); $this->cmbSiteType->addItem("activity", "activity", SITE_META_OPENGRAPH_TYPE == "activity" ? true : false); $this->cmbSiteType->addItem("sport", "sport", SITE_META_OPENGRAPH_TYPE == "sport" ? true : false); $this->cmbSiteType->addItem("bar", "bar", SITE_META_OPENGRAPH_TYPE == "bar" ? true : false); $this->cmbSiteType->addItem("company", "company", SITE_META_OPENGRAPH_TYPE == "company" ? true : false); $this->cmbSiteType->addItem("cafe", "cafe", SITE_META_OPENGRAPH_TYPE == "cafe" ? true : false); $this->cmbSiteType->addItem("hotel", "hotel", SITE_META_OPENGRAPH_TYPE == "hotel" ? true : false); $this->cmbSiteType->addItem("restaurant", "restaurant", SITE_META_OPENGRAPH_TYPE == "restaurant" ? true : false); $this->cmbSiteType->addItem("cause", "cause", SITE_META_OPENGRAPH_TYPE == "cause" ? true : false); $this->cmbSiteType->addItem("sports_league", "sports league", SITE_META_OPENGRAPH_TYPE == "sports_league" ? true : false); $this->cmbSiteType->addItem("sports_team", "sports team", SITE_META_OPENGRAPH_TYPE == "sports_team" ? true : false); $this->cmbSiteType->addItem("band", "band", SITE_META_OPENGRAPH_TYPE == "band" ? true : false); $this->cmbSiteType->addItem("government", "government", SITE_META_OPENGRAPH_TYPE == "government" ? true : false); $this->cmbSiteType->addItem("non_profit", "non profit", SITE_META_OPENGRAPH_TYPE == "non_profit" ? true : false); $this->cmbSiteType->addItem("school", "school", SITE_META_OPENGRAPH_TYPE == "school" ? true : false); $this->cmbSiteType->addItem("university", "university", SITE_META_OPENGRAPH_TYPE == "university" ? true : false); $this->cmbSiteType->addItem("actor", "actor", SITE_META_OPENGRAPH_TYPE == "actor" ? true : false); $this->cmbSiteType->addItem("athlete", "athlete", SITE_META_OPENGRAPH_TYPE == "athlete" ? true : false); $this->cmbSiteType->addItem("author", "author", SITE_META_OPENGRAPH_TYPE == "author" ? true : false); $this->cmbSiteType->addItem("director", "director", SITE_META_OPENGRAPH_TYPE == "director" ? true : false); $this->cmbSiteType->addItem("musician", "musician", SITE_META_OPENGRAPH_TYPE == "musician" ? true : false); $this->cmbSiteType->addItem("politician", "politician", SITE_META_OPENGRAPH_TYPE == "politician" ? true : false); $this->cmbSiteType->addItem("profile", "profile", SITE_META_OPENGRAPH_TYPE == "profile" ? true : false); $this->cmbSiteType->addItem("public_figure", "public figure", SITE_META_OPENGRAPH_TYPE == "public_figure" ? true : false); $this->cmbSiteType->addItem("city", "city", SITE_META_OPENGRAPH_TYPE == "city" ? true : false); $this->cmbSiteType->addItem("country", "country", SITE_META_OPENGRAPH_TYPE == "country" ? true : false); $this->cmbSiteType->addItem("landmark", "landmark", SITE_META_OPENGRAPH_TYPE == "landmark" ? true : false); $this->cmbSiteType->addItem("state_province", "state province", SITE_META_OPENGRAPH_TYPE == "state_province" ? true : false); $this->cmbSiteType->addItem("album", "album", SITE_META_OPENGRAPH_TYPE == "album" ? true : false); $this->cmbSiteType->addItem("book", "book", SITE_META_OPENGRAPH_TYPE == "book" ? true : false); $this->cmbSiteType->addItem("drink", "drink", SITE_META_OPENGRAPH_TYPE == "drink" ? true : false); $this->cmbSiteType->addItem("food", "food", SITE_META_OPENGRAPH_TYPE == "food" ? true : false); $this->cmbSiteType->addItem("game", "game", SITE_META_OPENGRAPH_TYPE == "game" ? true : false); $this->cmbSiteType->addItem("movie", "movie", SITE_META_OPENGRAPH_TYPE == "movie" ? true : false); $this->cmbSiteType->addItem("product", "product", SITE_META_OPENGRAPH_TYPE == "product" ? true : false); $this->cmbSiteType->addItem("song", "song", SITE_META_OPENGRAPH_TYPE == "song" ? true : false); $this->cmbSiteType->addItem("tv_show", "tv show", SITE_META_OPENGRAPH_TYPE == "tv_show" ? true : false); $this->cmbSiteType->addItem("article", "article", SITE_META_OPENGRAPH_TYPE == "article" ? true : false); $this->cmbSiteType->addItem("blog", "blog", SITE_META_OPENGRAPH_TYPE == "blog" ? true : false); $this->cmbSiteType->addItem("website", "website", SITE_META_OPENGRAPH_TYPE == "website" ? true : false); $this->cmbSiteType->setWidth(143); $table_form->addRowColumns(__(CMB_SITE_TYPE) . ": ", $this->cmbSiteType); $this->edtSiteImage = new TextBox($this->form, "edtSiteImage"); $this->edtSiteImage->setValue(SITE_META_OPENGRAPH_IMAGE)->setWidth(300); $table_form->addRowColumns(__(EDT_SITE_IMAGE) . ": ", $this->edtSiteImage); $table_form->addRow(); $this->edtSiteIphoneImage57 = new TextBox($this->form, "edtSiteIphoneImage57"); $this->edtSiteIphoneImage57->setValue(SITE_META_IPHONE_IMAGE_57PX)->setWidth(300); $table_form->addRowColumns(__(EDT_SITE_IPHONE_IMAGE_57PX) . ": ", $this->edtSiteIphoneImage57); $this->edtSiteIphoneImage72 = new TextBox($this->form, "edtSiteIphoneImage72"); $this->edtSiteIphoneImage72->setValue(SITE_META_IPHONE_IMAGE_72PX)->setWidth(300); $table_form->addRowColumns(__(EDT_SITE_IPHONE_IMAGE_72PX) . ": ", $this->edtSiteIphoneImage72); $this->edtSiteIphoneImage114 = new TextBox($this->form, "edtSiteIphoneImage114"); $this->edtSiteIphoneImage114->setValue(SITE_META_IPHONE_IMAGE_114PX)->setWidth(300); $table_form->addRowColumns(__(EDT_SITE_IPHONE_IMAGE_114PX) . ": ", $this->edtSiteIphoneImage114); if (!defined("SITE_META_IPHONE_IMAGE_152PX")) { define("SITE_META_IPHONE_IMAGE_152PX", ""); } $this->edtSiteIphoneImage152 = new TextBox($this->form, "edtSiteIphoneImage152"); $this->edtSiteIphoneImage152->setValue(SITE_META_IPHONE_IMAGE_152PX)->setWidth(300); $table_form->addRowColumns(__(EDT_SITE_IPHONE_IMAGE_152PX) . ": ", $this->edtSiteIphoneImage152); $table_form->addRow(); $this->edtGoogleTracker = new TextBox($this->form, "edtGoogleTracker"); $this->edtGoogleTracker->setValue(GOOGLE_CODE_TRACKER); $table_form->addRowColumns(__(EDT_GOOGLE_CODE_TRACKER) . ": ", $this->edtGoogleTracker); /*$this->edtGoogleMapKey = new TextBox($this->form, "edtGoogleMapKey"); $this->edtGoogleMapKey->setValue(GOOGLE_MAP_KEY); $table_form->addRowColumns(__(EDT_GOOGLE_MAP_KEY).": ", $this->edtGoogleMapKey);*/ $table_form->addRow(); $this->cmbMetaRobots = new ComboBox($this->form, "cmbMetaRobots"); $this->cmbMetaRobots->addItem("index, follow", "index, follow", SITE_META_ROBOTS == "index, follow" ? true : false); $this->cmbMetaRobots->addItem("noindex, follow", "noindex, follow", SITE_META_ROBOTS == "noindex, follow" ? true : false); $this->cmbMetaRobots->addItem("index, nofollow", "index, nofollow", SITE_META_ROBOTS == "index, nofollow" ? true : false); $this->cmbMetaRobots->addItem("noindex, nofollow", "noindex, nofollow", SITE_META_ROBOTS == "noindex, nofollow" ? true : false); $this->cmbMetaRobots->setWidth(143); $table_form->addRowColumns(__(CMB_META_ROBOTS) . ": ", $this->cmbMetaRobots); $this->cmbMetaGooglebot = new ComboBox($this->form, "cmbMetaGooglebot"); $this->cmbMetaGooglebot->addItem("", " ", SITE_META_GOOGLEBOTS == "" ? true : false); $this->cmbMetaGooglebot->addItem("archive", "archive", SITE_META_ROBOTS == "archive" ? true : false); $this->cmbMetaGooglebot->addItem("noarchive", "noarchive", SITE_META_ROBOTS == "noarchive" ? true : false); $this->cmbMetaGooglebot->setWidth(143); $table_form->addRowColumns(__(CMB_META_GOOGLEBOTS) . ": ", $this->cmbMetaGooglebot); $this->edtRevisitAfter = new TextBox($this->form, "edtRevisitAfter"); $this->edtRevisitAfter->setValue(SITE_META_REVISIT_AFTER)->setWidth(80); $edtValidation = new LiveValidation(); $table_form->addRowColumns(__(EDT_REVISIT_AFTER) . ": ", new Object($this->edtRevisitAfter->setLiveValidation($edtValidation->addValidatePresence()->addValidateNumericality(true)->setFieldName(__(EDT_REVISIT_AFTER))), " " . __(DAYS))); $table_form->addRow(); $this->btnValidateF1 = new Button($this->form, "btnValidateF1"); $this->btnValidateF1->setValue(__(BTN_VALIDATE))->onClick("configureSite")->setAjaxEvent(); $table_form->addRowColumns($this->btnValidateF1)->setColumnColspan(1, 3)->setColumnAlign(1, RowTable::ALIGN_CENTER); $this->form->setContent($table_form); // advance tab $this->form2 = new Form($this); $table_form2 = new Table(); $table_form2->addRow(); $this->cmbJQueryVersion = new ComboBox($this->form2, "cmbJQueryVersion"); $this->cmbJQueryVersion->setWidth(143); $table_form2->addRowColumns(__(CMB_JQUERY_VERSION) . ": ", $this->cmbJQueryVersion); $this->cmbJQueryUIVersion = new ComboBox($this->form2, "cmbJQueryUIVersion"); $this->cmbJQueryUIVersion->setWidth(143); $table_form2->addRowColumns(__(CMB_JQUERY_UI_VERSION) . ": ", $this->cmbJQueryUIVersion); $jquery_dir = SITE_DIRECTORY . "/wsp/js/jquery/"; $files = scandir($jquery_dir, 0); for ($i = 0; $i < sizeof($files); $i++) { $file = $files[$i]; if (is_file($jquery_dir . $file)) { $version = str_replace("jquery-", "", str_replace(".min.js", "", $file)); if (is_numeric(str_replace(".", "", $version))) { $this->cmbJQueryVersion->addItem($version, $version, JQUERY_VERSION == $version ? true : false); } else { if (substr($version, 0, 3) == "ui-" && substr($version, strlen($version) - 7, strlen($version)) == ".custom") { $version = str_replace("ui-", "", str_replace(".custom", "", $version)); $this->cmbJQueryUIVersion->addItem($version, $version, JQUERY_UI_VERSION == $version ? true : false); } } } } $this->cmbJqueryLocal = new ComboBox($this->form2, "cmbJqueryLocal"); $this->cmbJqueryLocal->addItem("true", "true", JQUERY_LOAD_LOCAL == true ? true : false); $this->cmbJqueryLocal->addItem("false", "false", JQUERY_LOAD_LOCAL == false ? true : false); $this->cmbJqueryLocal->setWidth(143); $table_form2->addRowColumns(__(CMB_JQUERY_LOAD_LOCAL) . ": ", $this->cmbJqueryLocal); $table_form2->addRow(); $this->edtDefaultTimezone = new TextBox($this->form2, "edtDefaultTimezone"); $this->edtDefaultTimezone->setValue(DEFAULT_TIMEZONE); $edtValidation = new LiveValidation(); $table_form2->addRowColumns(__(EDT_DEFAULT_TIMEZONE) . ": ", $this->edtDefaultTimezone->setLiveValidation($edtValidation->addValidatePresence()->setFieldName(__(EDT_DEFAULT_TIMEZONE)))); $table_form2->addRow(); $this->edtMaxSessionTime = new TextBox($this->form2, "edtMaxSessionTime"); $this->edtMaxSessionTime->setValue(MAX_SESSION_TIME)->setWidth(80); $edtValidation = new LiveValidation(); $table_form2->addRowColumns(__(EDT_MAX_SESSION_TIME) . ": ", new Object($this->edtMaxSessionTime->setLiveValidation($edtValidation->addValidatePresence()->addValidateNumericality(true)->setFieldName(__(EDT_MAX_SESSION_TIME))), " " . __(SECONDS))); $table_form2->addRow(); $this->cmbCachingAllPage = new ComboBox($this->form2, "cmbCachingAllPage"); $this->cmbCachingAllPage->addItem("true", "true", CACHING_ALL_PAGES == true ? true : false); $this->cmbCachingAllPage->addItem("false", "false", CACHING_ALL_PAGES == false ? true : false); $this->cmbCachingAllPage->onChange("changeCachingAllPage")->setAjaxEvent()->disableAjaxWaitMessage(); $this->cmbCachingAllPage->setWidth(143); $table_form2->addRowColumns(__(CMB_CACHING_ALL_PAGES) . ": ", $this->cmbCachingAllPage); $this->edtCacheTime = new TextBox($this->form2, "edtCacheTime"); $this->edtCacheTime->setValue(CACHE_TIME)->setWidth(80); if (CACHING_ALL_PAGES == false) { $this->edtCacheTime->disable(); $this->edtCacheTime->setValue(""); } $edtValidation = new LiveValidation(); $table_form2->addRowColumns(__(EDT_CACHE_TIME) . ": ", new Object($this->edtCacheTime->setLiveValidation($edtValidation->addValidatePresence()->addValidateNumericality(true)->setFieldName(__(EDT_CACHE_TIME))), " " . __(SECONDS))); /*if (!defined("LITE_PHP_BROWSCAP")) { define("LITE_PHP_BROWSCAP", true); } $this->cmbBrowscap = new ComboBox($this->form2, "cmbBrowscap"); $this->cmbBrowscap->addItem("true", "true", (LITE_PHP_BROWSCAP==true)?true:false); $this->cmbBrowscap->addItem("false", "false", (LITE_PHP_BROWSCAP==false)?true:false); $this->cmbBrowscap->setWidth(143); $table_form2->addRowColumns(__(CMB_LITE_PHP_BROWSCAP).": ", $this->cmbBrowscap); $table_form2->addRowColumns(" ", __(LITE_PHP_BROWSCAP_EXPLANATION));*/ /*$this->cmbJsCompression = new ComboBox($this->form); $this->cmbJsCompression->addItem("NONE", "NONE", (JS_COMPRESSION_TYPE=="NONE")?true:false); $this->cmbJsCompression->addItem("GOOGLE_WS", "GOOGLE_WS", (JS_COMPRESSION_TYPE=="GOOGLE_WS")?true:false); $this->cmbJsCompression->addItem("LOCAL", "LOCAL", (JS_COMPRESSION_TYPE=="LOCAL")?true:false); $this->cmbJsCompression->setWidth(143); $table_form->addRowColumns(__(CMB_JS_COMPRESSION_TYPE).": ", $this->cmbJsCompression);*/ $table_form2->addRow(); $this->cmbDebug = new ComboBox($this->form2, "cmbDebug"); $this->cmbDebug->addItem("true", "true", DEBUG == true ? true : false); $this->cmbDebug->addItem("false", "false", DEBUG == false ? true : false); $this->cmbDebug->setWidth(143); $table_form2->addRowColumns(__(CMB_DEBUG) . ": ", $this->cmbDebug); $table_form2->addRow(); if (!defined("SEND_ERROR_BY_MAIL")) { define(SEND_ERROR_BY_MAIL, false); } $this->cmbSendErrorByMail = new ComboBox($this->form2, "cmbSendErrorByMail"); $this->cmbSendErrorByMail->addItem("true", "true", SEND_ERROR_BY_MAIL == true ? true : false); $this->cmbSendErrorByMail->addItem("false", "false", SEND_ERROR_BY_MAIL == false ? true : false); $this->cmbSendErrorByMail->setWidth(143); $this->cmbSendErrorByMail->onChange("changeSendErrorByMail")->setAjaxEvent()->disableAjaxWaitMessage(); $table_form2->addRowColumns(__(CMB_SEND_ERROR_BY_MAIL) . ": ", $this->cmbSendErrorByMail); $this->edtSendErrorByMailTo = new TextBox($this->form2, "edtSendErrorByMailTo"); $this->edtSendErrorByMailTo->setWidth(143)->setValue(defined("SEND_ERROR_BY_MAIL_TO") ? SEND_ERROR_BY_MAIL_TO : ""); if (SEND_ERROR_BY_MAIL == false) { $this->edtSendErrorByMailTo->disable(); } $edtValidation = new LiveValidation(); $this->edtSendErrorByMailTo->setLiveValidation($edtValidation->addValidateEmail()->setFieldName(__(EDT_SEND_ERROR_BY_MAIL_TO))); $table_form2->addRowColumns(__(EDT_SEND_ERROR_BY_MAIL_TO) . ": ", new Object($this->edtSendErrorByMailTo, " ", __(SEND_ERROR_BY_MAIL_CMT))); if (!defined("SEND_JS_ERROR_BY_MAIL")) { define(SEND_JS_ERROR_BY_MAIL, false); } $this->cmbSendJsErrorByMail = new ComboBox($this->form2, "cmbSendJsErrorByMail"); $this->cmbSendJsErrorByMail->addItem("true", "true", SEND_JS_ERROR_BY_MAIL == true ? true : false); $this->cmbSendJsErrorByMail->addItem("false", "false", SEND_JS_ERROR_BY_MAIL == false ? true : false); $this->cmbSendJsErrorByMail->setWidth(143); $table_form2->addRowColumns(__(CMB_SEND_JS_ERROR_BY_MAIL) . ": ", $this->cmbSendJsErrorByMail); if (defined("SEND_BY_MAIL_FILE_EX")) { $this->array_files_ex = explode(',', SEND_BY_MAIL_FILE_EX); } else { $this->array_files_ex = array(); } $this->hidden_nb_exclude_files = new Hidden($this->form2, "hidden_nb_exclude_files"); if ($this->hidden_nb_exclude_files->getValue() == "") { if (sizeof($this->array_files_ex) > 0) { $this->hidden_nb_exclude_files->setValue(sizeof($this->array_files_ex) + 1); } else { $this->hidden_nb_exclude_files->setValue($this->nb_min_exclude_files); } } $table_form2->addRowColumns("", $this->hidden_nb_exclude_files); $this->exclude_files_table = new Table(); $this->exclude_files_table->setId("exclude_files_table_id"); $this->nb_empty_exclude_files = 0; $this->edt_exclude_files = array(); for ($i = 1; $i <= $this->hidden_nb_exclude_files->getValue(); $i++) { $edt_exclude_files = $this->createExcludedFile(); if (trim($edt_exclude_files->getValue()) == "") { if ($this->edt_exclude_files_focus == null) { $this->edt_exclude_files_focus = $edt_exclude_files; } $this->nb_empty_exclude_files++; } } $table_form2->addRowColumns(__(EDT_SEND_BY_MAIL_FILE_EX) . ": <br/><i><font size=1>" . __(EDT_SEND_BY_MAIL_FILE_EX_CMT) . "</font></i>", $this->exclude_files_table)->setValign(RowTable::VALIGN_TOP); $this->changeSendErrorByMail(); $table_form2->addRow(); $this->edtMaxBadUrlBeforeBan = new TextBox($this->form2, "edtMaxBadUrlBeforeBan"); $this->edtMaxBadUrlBeforeBan->setWidth(143)->setValue(MAX_BAD_URL_BEFORE_BANNED); $edtValidation = new LiveValidation(); $this->edtMaxBadUrlBeforeBan->setLiveValidation($edtValidation->addValidatePresence()->addValidateNumericality()->setFieldName(__(EDT_MAX_BAD_URL_BEFORE_BANNED))); $table_form2->addRowColumns(__(EDT_MAX_BAD_URL_BEFORE_BANNED) . ": ", $this->edtMaxBadUrlBeforeBan); $table_form2->addRow(); if (!defined("SEND_ADMIN_CONNECT_BY_MAIL")) { define(SEND_ADMIN_CONNECT_BY_MAIL, false); } $this->cmbSendAdminConnectByMail = new ComboBox($this->form2, "cmbSendAdminConnectByMail"); $this->cmbSendAdminConnectByMail->addItem("true", "true", SEND_ADMIN_CONNECT_BY_MAIL == true ? true : false); $this->cmbSendAdminConnectByMail->addItem("false", "false", SEND_ADMIN_CONNECT_BY_MAIL == false ? true : false); $this->cmbSendAdminConnectByMail->setWidth(143); $this->cmbSendAdminConnectByMail->onChange("changeSendAdminConnectByMail")->setAjaxEvent()->disableAjaxWaitMessage(); $table_form2->addRowColumns(__(CMB_SEND_ADMIN_CONNECT_BY_MAIL) . ": ", $this->cmbSendAdminConnectByMail); $this->edtSendAdminConnectByMailTo = new TextBox($this->form2, "edtSendAdminConnectByMailTo"); $this->edtSendAdminConnectByMailTo->setWidth(143)->setValue(defined("SEND_ADMIN_CONNECT_BY_MAIL_TO") ? SEND_ADMIN_CONNECT_BY_MAIL_TO : ""); if (SEND_ADMIN_CONNECT_BY_MAIL == false) { $this->edtSendAdminConnectByMailTo->disable(); } $edtValidation = new LiveValidation(); $this->edtSendAdminConnectByMailTo->setLiveValidation($edtValidation->addValidateEmail()->setFieldName(__(EDT_SEND_ADMIN_CONNECT_BY_MAIL_TO))); $table_form2->addRowColumns(__(EDT_SEND_ADMIN_CONNECT_BY_MAIL_TO) . ": ", new Object($this->edtSendAdminConnectByMailTo, " ", __(SEND_ADMIN_CONNECT_BY_MAIL_CMT))); $table_form2->addRow(); $this->edtCdnServer = new TextBox($this->form2, "edtCdnServer"); if (!defined("CDN_SERVER") || CDN_SERVER == "") { $this->edtCdnServer->setValue("http://"); } else { $this->edtCdnServer->setValue(CDN_SERVER); } $table_form2->addRowColumns(__(EDT_CDN_SERVER) . ": ", $this->edtCdnServer->setWidth(300)); $table_form2->addRowColumns(" ", __(CDN_SERVER_CMT)); $this->edtForceServerName = new TextBox($this->form2, "edtForceServerName"); if (FORCE_SERVER_NAME == "") { $this->edtForceServerName->setValue("http://"); } else { $this->edtForceServerName->setValue(FORCE_SERVER_NAME); } $table_form2->addRowColumns(__(EDT_FORCE_SERVER_NAME) . ": ", $this->edtForceServerName->setWidth(300)); $table_form2->addRowColumns(" ", __(PROBLEM_WITH_REDIRECT)); $table_form2->addRow(); $this->btnValidateF2 = new Button($this->form2, "btnValidateF2"); $this->btnValidateF2->setValue(__(BTN_VALIDATE))->onClick("configureSite")->setAjaxEvent(); $table_form2->addRowColumns($this->btnValidateF2)->setColumnColspan(1, 3)->setColumnAlign(1, RowTable::ALIGN_CENTER); $table_form2->addRow(); $this->form2->setContent($table_form2); $tabs = new Tabs("tabs_id"); $tabs->addTab(__(TAB_SITE), $this->form); $tabs->addTab(__(TAB_ADVANCE), $this->form2); $this->render = new AdminTemplateForm($this, $tabs); }