Beispiel #1
0
 public function Index($realm = false, $id = false)
 {
     clientLang("loading", "item");
     // Make sure item and realm are set
     if (!$id || !$realm) {
         die(lang("no_item", "item"));
     }
     $this->realm = $realm;
     $cache = $this->cache->get("items/tooltip_" . $realm . "_" . $id . "_" . getLang());
     $cache2 = $this->cache->get("items/item_" . $realm . "_" . $id);
     if ($cache2 !== false) {
         $itemName = $cache2['name'];
     } else {
         $itemName = lang("view_item", "item");
     }
     $this->template->setTitle($itemName);
     $icon = $this->getIcon($id);
     if ($cache !== false) {
         $item = $cache;
     } else {
         $item = $this->template->loadPage("ajax.tpl", array('module' => 'item', 'id' => $id, 'realm' => $realm, 'icon' => $icon));
     }
     $content = $this->template->loadPage("item.tpl", array('module' => 'item', 'item' => $item, 'icon' => $icon));
     $data3 = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "armory\"'>" . lang("armory", "item") . "</span> &rarr; " . $itemName, "content" => $content);
     $page = $this->template->loadPage("page.tpl", $data3);
     $this->template->view($page, "modules/item/css/item.css");
 }
    public function display(array $context)
    {
        // line 1
        echo "<div style=\"padding:0px 0px 5px 10px\" class=\"Text\">";
        echo twig_safe_filter((isset($context['HelpText']) ? $context['HelpText'] : null));
        echo "</div>
<table width=\"100%\" class=\"Panel\">
<tr style=\"";
        // line 3
        echo twig_safe_filter((isset($context['HideHeaderRow']) ? $context['HideHeaderRow'] : null));
        echo "\">
\t<td class=\"Heading2\" colspan=\"2\">";
        // line 4
        echo twig_safe_filter((isset($context['ShipperId']) ? $context['ShipperId'] : null));
        echo " ";
        echo getLang("Settings");
        echo "</td>
</tr>
";
        // line 6
        echo twig_safe_filter((isset($context['Properties']) ? $context['Properties'] : null));
        echo "
</table>

";
    }
Beispiel #3
0
/**
 * Return a formatted price for a product for display on product detail pages.
 * Detail pages are defined as those product pages which contain the primary
 * details for a product.
 *
 * @see formatProductPrice
 * @param array $product Array containing the product to format the price for.
 * @param array $options Array of options, passed to formatProductPrice
 * @return string Generated HTML to display the price for the product.
 */
function formatProductDetailsPrice($product, array $options = array())
{
	$displayFormat = getConfig('taxDefaultTaxDisplayProducts');
	$options['displayInclusive'] = $displayFormat;

	if($displayFormat != TAX_PRICES_DISPLAY_BOTH) {
		return formatProductPrice($product, $product['prodcalculatedprice'], $options);
	}

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_INCLUSIVE;
	$priceIncTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$options['displayInclusive'] = TAX_PRICES_DISPLAY_EXCLUSIVE;
	$priceExTax = formatProductPrice($product, $product['prodcalculatedprice'], $options);

	$output = '<span class="ProductDetailsPriceIncTax">';
	$output .= $priceIncTax;
	$output .= getLang('ProductDetailsPriceIncTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output .= '</span> ';
	$output .= '<span class="ProductDetailsPriceExTax">';
	$output .= $priceExTax;
	$output .= getLang('ProductDetailsPriceExTaxLabel', array(
		'label' => getConfig('taxLabel')
	));
	$output  .= '</span>';
	return $output;
}
 public function showSlug($slug)
 {
     $type = TypeNew::findBySlug($slug);
     $typeName = $type->name;
     $data = Common::getNews($type->id, getLang());
     return View::make('site.news.listNews')->with(compact('data', 'typeName', 'slug'));
 }
Beispiel #5
0
 /**
  * Load the comments of one article
  * @param Int $id
  */
 public function get($id)
 {
     requirePermission("canViewComments");
     $cache = $this->cache->get("comments_" . $id . "_" . getLang());
     if ($cache !== false) {
         $comments = $cache;
     } else {
         $comments = $this->comments_model->getComments($id);
         if (is_array($comments)) {
             // Loop through and format the comments
             foreach ($comments as $key => $comment) {
                 $comments[$key]['profile'] = $this->template->page_url . "profile/" . $comment['author_id'];
                 $comments[$key]['avatar'] = $this->user->getAvatar($comment['author_id'], "small");
                 $comments[$key]['author'] = $this->user->getNickname($comment['author_id']);
             }
         }
         $this->cache->save("comments_" . $id . "_" . getLang(), $comments);
     }
     $comments_html = '';
     if (is_array($comments)) {
         $comments_html = $this->template->loadPage("comments.tpl", array('url' => $this->template->page_url, 'comments' => $comments, 'user_is_gm' => hasPermission('canRemoveComment')));
     }
     $values = array("form" => $this->user->isOnline() ? "onSubmit='Ajax.submitComment(" . $id . ");return false'" : "onSubmit='UI.alert(\"Please log in to comment!\");return false'", "online" => $this->user->isOnline(), "field_id" => "id='comment_field_" . $id . "'", "comments" => $comments_html, "comments_id" => "id='comments_area_" . $id . "'", "id" => $id);
     $output = $this->template->loadPage("article_comments.tpl", $values);
     die($output);
 }
Beispiel #6
0
function internalRouteURI(string $requestUri = '') : string
{
    $config = Config::get('Services', 'route');
    if ($config['openPage']) {
        $internalDir = NULL;
        if (defined('_CURRENT_PROJECT')) {
            $configAppdir = PROJECTS_CONFIG['directory']['others'];
            if (is_array($configAppdir)) {
                $internalDir = !empty($configAppdir[$requestUri]) ? $requestUri : _CURRENT_PROJECT;
            } else {
                $internalDir = _CURRENT_PROJECT;
            }
        }
        if ($requestUri === DIRECTORY_INDEX || $requestUri === getLang() || $requestUri === $internalDir || empty($requestUri)) {
            $requestUri = $config['openPage'];
        }
    }
    $uriChange = $config['changeUri'];
    $patternType = $config['patternType'];
    if (!empty($uriChange)) {
        foreach ($uriChange as $key => $val) {
            if ($patternType === 'classic') {
                $requestUri = preg_replace(presuffix($key) . 'xi', $val, $requestUri);
            } else {
                $requestUri = Regex::replace($key, $val, $requestUri, 'xi');
            }
        }
    }
    return $requestUri;
}
Beispiel #7
0
/**
 * adminmenu.php
 *
 * @version 1.2
 * @copyright 2008 By Chlorel for XNova
 * @copyright 2009 By MadnessRed for XNova Redesigned
 */
function ShowLeftMenu($cpage = 'x')
{
    global $lang;
    $qry = doquery("SELECT COUNT('error_id') as `errors` FROM {{table}}", 'errors', true);
    $errorscount = $qry['errors'];
    $qry = doquery("SELECT `id` FROM {{table}} WHERE `status` = 1 || `status` = 2 ;", 'supp');
    $ticketcount = mysql_num_rows($qry);
    $info = @file(XNOVAUKLINK . "info.php");
    if ($info[0] != VERSION . "\n") {
        $newversion = colourRed("(*)");
    }
    $adminpages = array('overview' => 'Overview ' . $newversion, 'config' => 'Configuration', 'edit' => 'Manage Users', 'errors' => 'Errors (' . $errorscount . ')', 'supp' => 'Tickets (' . $ticketcount . ')');
    getLang('menu');
    $parse = $lang;
    $parse['links'] = '';
    foreach ($adminpages as $get => $title) {
        $parse['links'] .= '
		<li class="menubutton_table">
			<span class="menu_icon">
		  		<img src="' . GAME_SKIN . '/img/navigation/navi_ikon_premium_b.gif" height="29" width="38" />
		  	</span>
			<a class="menubutton" href="./?page=admin&link=' . $get . '" title=\'' . $title . '\' tabindex="1">
				<span class="textlabel">' . $title . '</span>
			</a>
		</li>
		';
    }
    $Menu = parsetemplate(gettemplate('redesigned/adminmenu'), $parse);
    return $Menu;
}
Beispiel #8
0
 public function index($realm = false, $id = false)
 {
     // Make sure item and realm are set
     if (!$id || !$realm) {
         die(lang("invalid", "guild"));
     }
     $cache = $this->cache->get('guild_' . $realm . '_' . $id . "_" . getLang());
     if ($cache !== false) {
         $page = $cache;
     } else {
         $this->realm = $realm;
         $this->loadGuild($realm, $id);
         if (!$this->guild) {
             $this->template->setTitle(lang("invalid_guild", "guild"));
         } else {
             $this->template->setTitle($this->guild['guildName']);
         }
         $guild_data = array('module' => 'guild', 'guild' => $this->guild, 'members' => $this->members, 'leader' => $this->guildLeader, 'realmId' => $realm, 'realmName' => $this->realms->getRealm($realm)->getName(), 'url' => $this->template->page_url);
         $content = $this->template->loadPage("guild.tpl", $guild_data);
         $data = array("module" => "default", "headline" => "<span style='cursor:pointer;' onClick='window.location=\"" . $this->template->page_url . "armory\"'>" . lang("armory", "guild") . "</span> &rarr; " . (!$this->guild ? lang("invalid_guild", "guild") : $this->guild['guildName']), "content" => $content);
         $page = $this->template->loadPage("page.tpl", $data);
         $this->cache->save('guild_' . $realm . '_' . $id . "_" . getLang(), $page, 60 * 60);
     }
     $this->template->view($page, "modules/guild/css/guild.css");
 }
 public function postContact()
 {
     $formData = array('sender_name_surname' => Input::get('sender_name_surname'), 'sender_email' => Input::get('sender_email'), 'sender_phone_number' => Input::get('sender_phone_number'), 'subject' => Input::get('subject'), 'post' => Input::get('message'));
     $rules = array('sender_name_surname' => 'required', 'sender_email' => 'required|email', 'sender_phone_number' => 'required', 'subject' => 'required', 'post' => 'required');
     $validation = Validator::make($formData, $rules);
     if ($validation->fails()) {
         return Redirect::action('FormPostController@getContact')->withErrors($validation)->withInput();
     }
     /*
     Mail::send('emails.contact-form.form', $formData, function ($message) {
         $message->from(Input::get('sender_email'), Input::get('sender_name_surname'));
         $message->to('*****@*****.**', 'Lorem Lipsum')->subject(Input::get('subject'));
     });
     */
     /*
     $mailer = new Mailer;
     $mailer->send('emails.contact-form.form', '*****@*****.**', Input::get('subject'), $formData);
     */
     $formPost = new FormPost();
     $formPost->sender_name_surname = $formData['sender_name_surname'];
     $formPost->sender_email = $formData['sender_email'];
     $formPost->sender_phone_number = $formData['sender_phone_number'];
     $formPost->subject = $formData['subject'];
     $formPost->message = $formData['post'];
     $formPost->lang = getLang();
     $formPost->save();
     return Redirect::action('FormPostController@getContact')->with('message', 'Success');
 }
Beispiel #10
0
 public function get($id = false)
 {
     // Is it loaded via ajax or not?
     if ($id === false) {
         $id = 0;
         $die = false;
     } else {
         $die = true;
     }
     $cache = $this->cache->get("shoutbox_" . $id . "_" . getLang());
     if ($cache !== false) {
         $shouts = $cache;
     } else {
         // Load the shouts
         $shouts = $this->shoutbox_model->getShouts($id, $this->config->item('shouts_per_page'));
         // Format the shout data
         foreach ($shouts as $key => $value) {
             $shouts[$key]['nickname'] = $this->internal_user_model->getNickname($shouts[$key]['author']);
             $shouts[$key]['content'] = $this->template->format($shouts[$key]['content'], true, true, true, 40);
         }
         $this->cache->save("shoutbox_" . $id . "_" . getLang(), $shouts);
     }
     foreach ($shouts as $key => $value) {
         $shouts[$key]['date'] = $this->template->formatTime(time() - $shouts[$key]['date']);
     }
     // Prepare the data
     $data = array("module" => "sidebox_shoutbox", "shouts" => $shouts, "url" => $this->template->page_url, "user_is_gm" => hasPermission("removeShout", "sidebox_shoutbox"));
     $shouts = $this->template->loadPage("shouts.tpl", $data);
     // To be or not to be, that's the question :-)
     if ($die) {
         die($shouts);
     } else {
         return $shouts;
     }
 }
Beispiel #11
0
 public function view()
 {
     if (count($this->realm) == 0) {
         return "This module has not been configured";
     } else {
         $cache = $this->cache->get("sidebox_toppvp_" . getLang());
         if ($cache !== false) {
             $out = $cache;
         } else {
             //Get the max chars to show
             $maxCount = $this->config->item('pvp_players');
             $realm_html = array();
             //For each realm
             foreach ($this->realm as $id => $realm) {
                 //Get the topkill characters
                 $topKillChars = $this->toppvp_model->getTopKillChars($maxCount, $realm);
                 $data = array("module" => "sidebox_toppvp", "name" => $realm->getName(), "id" => $realm->getId(), "characters" => $topKillChars, "url" => $this->template->page_url, "realm" => $realm->getId(), "showRace" => $this->config->item("pvp_show_race"), "showClass" => $this->config->item("pvp_show_class"));
                 $realm_html[$id] = $this->template->loadPage("realm.tpl", $data);
             }
             $out = $this->template->loadPage("pvp.tpl", array("module" => "sidebox_toppvp", "min_realm" => $this->min_realm, "max_realm" => $this->max_realm, "realm_html" => $realm_html, "realms" => $this->realm));
             // Cache for 12 hours
             $this->cache->save("sidebox_toppvp_" . getLang(), $out, 60 * 60 * 12);
         }
         return $out;
     }
 }
    public function gettooltip($id = null, $title = null, $content = null, $titleReplacements = null, $contentReplacements = null)
    {
        $context = array(
            "id" => $id,
            "title" => $title,
            "content" => $content,
            "titleReplacements" => $titleReplacements,
            "contentReplacements" => $contentReplacements,
        );

        echo "<img
\tonmouseout=\"HideHelp('";
        // line 3
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "');\" 
\tonmouseover=\"ShowHelp('";
        // line 4
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "', '";
        echo getLang((isset($context['title']) ? $context['title'] : null), (isset($context['titleReplacements']) ? $context['titleReplacements'] : null));
        echo "', '";
        echo getLang((isset($context['content']) ? $context['content'] : null), (isset($context['contentReplacements']) ? $context['contentReplacements'] : null));
        echo "')\" 
\tsrc=\"images/help.gif\" 
\twidth=\"24\" 
\theight=\"16\" 
\tborder=\"0\" 
\tstyle=\"margin-top: 5px;\"
/>
<div id=\"";
        // line 11
        echo twig_escape_filter($this->env, (isset($context['id']) ? $context['id'] : null), "1");
        echo "\"></div>
";
    }
Beispiel #13
0
 public function index($page = "error")
 {
     if ($page == "error") {
         redirect('error');
     } else {
         $cache = $this->cache->get("page_" . $page . "_" . getLang());
         if ($cache !== false) {
             $this->template->setTitle($cache['title']);
             $out = $cache['content'];
             if ($cache['permission'] && !hasViewPermission($cache['permission'], "--PAGE--")) {
                 $this->template->showError(lang("permission_denied", "error"));
             }
         } else {
             $page_content = $this->cms_model->getPage($page);
             if ($page_content == false) {
                 redirect('error');
             } else {
                 $this->template->setTitle(langColumn($page_content['name']));
                 $page_data = array("module" => "default", "headline" => langColumn($page_content['name']), "content" => langColumn($page_content['content']));
                 $out = $this->template->loadPage("page.tpl", $page_data);
                 $this->cache->save("page_" . $page . "_" . getLang(), array("title" => langColumn($page_content['name']), "content" => $out, "permission" => $page_content['permission']));
                 if ($page_content['permission'] && !hasViewPermission($page_content['permission'], "--PAGE--")) {
                     $this->template->showError(lang("permission_denied", "error"));
                 }
             }
         }
     }
     $this->template->view($out);
 }
Beispiel #14
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $formData = Input::all();
     if ($formData['type'] == 'module') {
         $option = $formData['option'];
         $url = $this->menu->getUrl($option);
         $formData['url'] = $url;
     }
     $host = $_SERVER['SERVER_NAME'];
     $urlInfo = parse_url($formData['url']);
     $rules = array('title' => 'required', 'url' => 'required');
     $validation = Validator::make($formData, $rules);
     if ($validation->fails()) {
         return langRedirectRoute('admin.menu.create')->withErrors($validation)->withInput();
     }
     $this->menu->fill($formData);
     $this->menu->order = $this->menu->getMaxOrder() + 1;
     if (isset($urlInfo['host'])) {
         $url = $host == $urlInfo['host'] ? $urlInfo['path'] : $formData['url'];
     } else {
         $url = $formData['type'] == 'module' ? $formData['url'] : "http://" . $formData['url'];
     }
     $this->menu->lang = getLang();
     $this->menu->url = $url;
     $this->menu->save();
     Flash::message('Menu was successfully added');
     return langRedirectRoute('admin.menu.index');
 }
Beispiel #15
0
function getCountryCustomizedPookMail()
{
    if (getLang() == "pt_br") {
        return '<font color="green">Pook</font><font color="yellow">Mail</font><font color="blue">.com</font>';
    }
    return 'P<font color="red">o</font><font color="blue">o</font>kMail.com';
}
Beispiel #16
0
/**
 * RecallFleet.php
 *
 * @version 1.0
 * @copyright 2010 By MadnessRed for XNova Redesigned
 */
function RecallFleet($id, $key = 'x', $user = '******')
{
    global $lang;
    //Get the lang strings
    getLang('fleet_management');
    //See what validation is needed
    $and = '';
    if ($key != 'x') {
        $and .= " AND `passkey` = '" . idstring($key) . "'";
    }
    if ($user != 'x') {
        $and .= " AND `owner_userid` = '" . idstring($user) . "'";
    }
    //First get said fleet:
    $fleetrow = doquery("SELECT *, COUNT('fleet_id') AS `count` FROM {{table}} WHERE `fleet_id` = '" . idstring($id) . "'" . $and . " AND `fleet_mess` = '0' AND `mission` <> '0' ;", 'fleets', true);
    //Check we found the fleet:
    if ($fleetrow['count'] == 1) {
        //Incase script takes over a second, lets keep now constant.
        $now = time();
        //Duration in flight
        $duration = $now - $fleetrow['departure'];
        //ok, lets update the fleet
        doquery("UPDATE {{table}} SET `departure` = '" . $now . "', `arrival` = '" . ($now + $duration) . "', `target_id` = '" . $fleetrow['owner_id'] . "', `target_userid` = '" . $fleetrow['owner_userid'] . "', `owner_id` = '" . $fleetrow['target_id'] . "', `owner_userid` = '" . $fleetrow['target_userid'] . "', `fleet_mess` = '1', `mission` = '0' WHERE `fleet_id` = '" . $fleetrow['fleet_id'] . "' ;", 'fleets', false);
        //Remove any partner fleets
        doquery("DELETE FROM {{table}} WHERE `partner_fleet` = '" . $fleetrow['fleet_id'] . "' ;", 'fleets', false);
        //Update menus
        doquery("UPDATE {{table}} SET `menus_update` = '" . time() . "' WHERE `id` = '" . $fleetrow['owner_userid'] . "' LIMIT 1 ;", 'users', false);
        doquery("UPDATE {{table}} SET `menus_update` = '" . time() . "' WHERE `id` = '" . $fleetrow['target_userid'] . "' LIMIT 1 ;", 'users', false);
        //Thats it
        return $lang['fleet_recall'];
    } else {
        return $lang['fleet_not_fnd'];
    }
}
    public function display(array $context)
    {
        // line 1
        echo "<tr class=\"";
        echo twig_safe_filter((isset($context['ZoneClass']) ? $context['ZoneClass'] : null));
        echo "\" onmouseover=\"\$(this).addClass('";
        echo twig_safe_filter((isset($context['ZoneClass']) ? $context['ZoneClass'] : null));
        echo "Over');\" onmouseout=\"\$(this).removeClass('";
        echo twig_safe_filter((isset($context['ZoneClass']) ? $context['ZoneClass'] : null));
        echo "Over');\">
\t<td style=\"text-align: center;\"><input type=\"checkbox\" class=\"check\" ";
        // line 2
        echo twig_safe_filter((isset($context['ZoneDeleteCheckbox']) ? $context['ZoneDeleteCheckbox'] : null));
        echo " name=\"zones[]\" value=\"";
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "\" /></td>
\t<td><img src=\"images/zone.gif\" alt=\"\" /></td>
\t<td>";
        // line 4
        echo twig_safe_filter((isset($context['ZoneName']) ? $context['ZoneName'] : null));
        echo "</td>
\t<td>";
        // line 5
        echo twig_safe_filter((isset($context['ZoneType']) ? $context['ZoneType'] : null));
        echo "</td>
\t<td style=\"text-align: center;\">";
        // line 6
        echo twig_safe_filter((isset($context['ZoneStatus']) ? $context['ZoneStatus'] : null));
        echo "</td>
\t<td>
\t\t<a href=\"index.php?ToDo=editShippingZone&amp;zoneId=";
        // line 8
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "\">";
        echo getLang("EditSettings");
        echo "</a>
\t\t<a href=\"index.php?ToDo=editShippingZone&amp;zoneId=";
        // line 9
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "&amp;currentTab=1\">";
        echo getLang("EditMethods");
        echo "</a>
\t\t<a href=\"index.php?ToDo=copyShippingZone&amp;zoneId=";
        // line 10
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "\">";
        echo getLang("Copy");
        echo "</a>
\t\t<a href=\"index.php?ToDo=deleteShippingZones&amp;zones[]=";
        // line 11
        echo twig_safe_filter((isset($context['ZoneId']) ? $context['ZoneId'] : null));
        echo "\" onclick=\"return ConfirmDeleteZone();\" style=\"";
        echo twig_safe_filter((isset($context['HideDeleteZone']) ? $context['HideDeleteZone'] : null));
        echo "\">";
        echo getLang("Delete");
        echo "</a>
\t</td>
</tr>";
    }
 public function display(array $context)
 {
     // line 1
     echo "\t\t\t<table class=\"GridPanel SortableGrid\" cellspacing=\"0\" cellpadding=\"0\" border=\"0\" id=\"IndexGrid\" style=\"width:100%;\">
t\t<tr class=\"Heading3\">
t\t\t<td align=\"center\"><input type=\"checkbox\" onclick=\"ToggleDeleteBoxes(this.checked)\"></td>
t\t\t<td>&nbsp;</td>
t\t\t<td>
t\t\t\t";
     // line 6
     echo getLang("BannerName");
     echo " &nbsp;
t\t\t\t";
     // line 7
     echo twig_safe_filter((isset($context['SortLinksName']) ? $context['SortLinksName'] : null));
     echo "
t\t\t</td>
t\t\t<td>
t\t\t\t";
     // line 10
     echo getLang("BannerLocation");
     echo " &nbsp;
t\t\t\t";
     // line 11
     echo twig_safe_filter((isset($context['SortLinksLocation']) ? $context['SortLinksLocation'] : null));
     echo "
t\t\t</td>
t\t\t<td>
t\t\t\t";
     // line 14
     echo getLang("DateCreated");
     echo " &nbsp;
t\t\t\t";
     // line 15
     echo twig_safe_filter((isset($context['SortLinksDate']) ? $context['SortLinksDate'] : null));
     echo "
t\t\t</td>
t\t\t<td style=\"width:70px;\">
t\t\t\t";
     // line 18
     echo getLang("Visible");
     echo " &nbsp;
t\t\t\t";
     // line 19
     echo twig_safe_filter((isset($context['SortLinksStatus']) ? $context['SortLinksStatus'] : null));
     echo "
t\t\t</td>
t\t\t<td style=\"width:80px;\">
t\t\t\t";
     // line 22
     echo getLang("Action");
     echo "\t\t\t\t</td>
t\t</tr>
t\t";
     // line 25
     echo twig_safe_filter((isset($context['BannerGrid']) ? $context['BannerGrid'] : null));
     echo "
t</table>";
 }
Beispiel #19
0
	public function __construct()
	{
		$GLOBALS['ISC_CLASS_ADMIN_ENGINE']->LoadLangFile('batch.importer');

		/**
		 * @var array Array of importable fields and their friendly names.
		 */
		$this->_ImportFields = array(
			"productid" => GetLang('ProductID'),
			"prodname" => GetLang('ProductName'),
			"category" => GetLang('ImportProductsCategory'),
			"category2" => GetLang('ImportProductsCategory2'),
			"category3" => GetLang('ImportProductsCategory3'),
			"brandname" => GetLang('BrandName'),
			"prodcode" => GetLang('ProductCodeSKU'),
			"proddesc" => GetLang('ProductDescription'),
			"prodprice" => GetLang('Price'),
			"prodcostprice" => GetLang('CostPrice'),
			"prodsaleprice" => GetLang('SalePrice'),
			"prodretailprice" => GetLang('RetailPrice'),
			"prodfixedshippingcost" => GetLang('FixedShippingCost'),
			"prodfreeshipping" => GetLang('FreeShipping'),
			"prodallowpurchases" => GetLang('ProductAllowPurchases'),
			"prodavailability" => GetLang('Availability'),
			"prodvisible" => GetLang('ProductVisible'),
			"prodinvtrack" => GetLang('ProductTrackInventory'),
			"prodcurrentinv" => GetLang('CurrentStockLevel'),
			"prodlowinv" => GetLang('LowStockLevel'),
			"prodwarranty" => GetLang('ProductWarranty'),
			"prodweight" => GetLang('ProductWeight'),
			"prodwidth" => GetLang('ProductWidth'),
			"prodheight" => GetLang('ProductHeight'),
			"proddepth" => GetLang('ProductDepth'),
			"prodpagetitle" => GetLang('PageTitle'),
			"prodsearchkeywords" => GetLang('SearchKeywords'),
			"prodmetakeywords" => GetLang('MetaKeywords'),
			"prodmetadesc" => GetLang('MetaDescription'),
			"prodimagefile" => GetLang('ProductImage'),
			"prodimagedescription" => GetLang('ProductImageDescription'),
			"prodimageisthumb" => GetLang('ProductImageIsThumb'),
			"prodimagesort" => GetLang('ProductImageSort'),
			"prodfile" => GetLang('ProductFile'),
			"prodfiledescription" => GetLang('ProductFileDescription'),
			"prodfilemaxdownloads" => GetLang('ProductFileMaxDownloads'),
			"prodfileexpiresafter" => GetLang('ProductFileExpiresAfter'),
			"prodcondition" => GetLang('ProductCondition'),
			"prodshowcondition" => GetLang('ProductShowCondition'),
			"prodeventdaterequired" => GetLang('ProductEventDateRequired'),
			"prodeventdatefieldname" => GetLang('ProductEventDateName'),
			"prodeventdatelimited" => GetLang('ProductEventDateLimited'),
			"prodeventdatelimitedstartdate" => GetLang('ProductEventDateStartDate'),
			"prodeventdatelimitedenddate" => GetLang('ProductEventDateEndDate'),
			"prodsortorder"	=> GetLang('SortOrder'),
			'tax_class_name' => getLang('ProductTaxClass'),
			'upc'	=> GetLang('ProductUPC'),
		);

		parent::__construct();
	}
 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function create()
 {
     $attributes = ['title' => 'Photo Gallery Title', 'content' => 'Photo Gallery Content', 'is_published' => false];
     try {
         $id = $this->photoGallery->create($attributes);
         return Redirect::to('/' . getLang() . '/admin/photo-gallery/' . $id . '/edit');
     } catch (ValidationException $e) {
     }
 }
Beispiel #21
0
/**
* 根据标签返回对应语言包的内容
* @param string $mark
* @return string
*/
function L($mark)
{
    static $lang;
    if (isset($lang) && is_array($lang)) {
    } else {
        $lang = (include_once YYK::$APP_path . DIRECTORY_SEPARATOR . 'Lang' . DIRECTORY_SEPARATOR . getLang() . '.php');
    }
    return isset($lang[$mark]) ? $lang[$mark] : $mark;
}
 public function testSetLang()
 {
     // set default lang
     setLang("");
     $this->assertEquals(getLang(), "testLang");
     //set lang testLang2
     setLang("testLang2");
     $this->assertEquals(getLang(), "testLang2");
 }
Beispiel #23
0
 public function __construct()
 {
     parent::__construct();
     $this->appdir = STORAGE_DIR . 'MultiLanguage/';
     if (!Folder::exists($this->appdir)) {
         Folder::create($this->appdir, 0755);
     }
     $this->lang = $this->appdir . getLang() . $this->extension;
 }
Beispiel #24
0
function addNewAdvisor($users_advisors_id=0) {
	if ($users_advisors_id&&!$_POST['_form_submit']){
		$_SESSION['admin']['uedit']=$users_advisors_id;
		$db=new DBConnection();
		$query='SELECT * FROM users_advisors WHERE users_advisors_id='.($users_advisors_id+0).'';
		$res=$db->rq($query);
		foreach ($db->fetch($res) as $RowName=>$RowValue){
			$FormFieldName=str_replace('advisor_', '', $RowName);
			$_POST[$FormFieldName]=$RowValue;
		}
		$db->close();
	}
	
	$pcontent='';
	$pcontent.='
<div class="mainHolder">
<div class="hintHolder ui-state-default"><b>'.(($users_advisors_id>0)?'Editing':'Creating New').' Advisor</b></div> 
<script type="text/javascript" src="../js/jquery.validate.js"></script>
<script type="text/javascript" src="js/forms/advisors.js"></script>
<form name="addNewAdvisor" method="POST" id="MainForms" action="">
<fieldset class="mainFormHolder">
	<legend>User information</legend>
	<div class="formsLeft">REF:</div>
	<div class="formsRight">
		<input class="text-input" type="text" name="ref" id="ref" value="'.$_POST['ref'].'" />
	</div>
	<br />
	<div class="formsLeft">Names:</div>
	<div class="formsRight">
		<input class="text-input" name="names" id="names" value="'.$_POST['names'].'" />
	</div>
	<br />
	<div class="formsLeft">Firm:</div>
	<div class="formsRight">
		<input class="text-input" name="firm" id="firm" value="'.$_POST['firm'].'" />
	</div>
	<br />
	<div class="formsLeft">Contacts:</div>
	<div class="formsRight">
		<input class="text-input" name="contacts" id="contacts" value="'.$_POST['contacts'].'" />
	</div>
	<input type="hidden" name="_form_submit" value="1" />
	<input type="submit" name="_submit" value="'.getLang('sform_savebtn').'" class="submitBtn ui-state-default" />
	';
	if ($users_advisors_id){
		$pcontent.='
	<input type="hidden" name="advid" value="'.$users_advisors_id.'">
	<input type="button" name="_delete" value="'.getLang('sform_delbtn').'" class="submitBtn ui-state-default" onclick="if(confirm(\'Are you sure you want to delete this advisor?\')) location=\'?action=delete&advid='.($_POST['users_advisors_id']+0).'\';" />';
	}
	$pcontent.='
	<input type="button" name="_cancel" value="'.getLang('sform_backbtn').'" class="submitBtn ui-state-default" onclick="location=\'users_advisors.php\';" />
	</fieldset>
</form>
</div>';
	return $pcontent;
}
Beispiel #25
0
 /**
  * @param $id
  *
  * @return mixed
  */
 public function getSettings()
 {
     $key = md5(getLang() . $this->cacheKey . 'settings');
     if ($this->cache->has($key)) {
         return $this->cache->get($key);
     }
     $setting = $this->setting->getSettings();
     $this->cache->put($key, $setting);
     return $setting;
 }
 /**
  * @return array
  */
 public function getSettings()
 {
     $obj = $this->setting->where('lang', getLang())->first() ?: $this->setting;
     $jsonData = $obj->settings;
     $setting = json_decode($jsonData, true);
     if ($setting === null) {
         $setting = array('site_title' => null, 'ga_code' => null, 'meta_keywords' => null, 'meta_description' => null);
     }
     return $setting;
 }
Beispiel #27
0
 /**
  * @return mixed
  */
 public function all()
 {
     $key = md5(getLang() . $this->cacheKey . 'all.sliders');
     if ($this->cache->has($key)) {
         return $this->cache->get($key);
     }
     $sliders = $this->slider->all();
     $this->cache->put($key, $sliders);
     return $sliders;
 }
Beispiel #28
0
 /**
  * @param $id
  * @return bool|mixed
  */
 public function hasChildItems($id)
 {
     $key = md5(getLang() . $this->cacheKey . $id . '.has.child');
     if ($this->cache->has($key)) {
         return $this->cache->get($key);
     }
     $result = $this->menu->hasChildItems($id);
     $this->cache->put($key, $result);
     return $result;
 }
Beispiel #29
0
 /**
  * @param $slug
  * @return mixed
  */
 public function getArticlesBySlug($slug)
 {
     $key = md5(getLang() . $this->cacheKey . '.all.tags.slug');
     if ($this->cache->has($key)) {
         return $this->cache->get($key);
     }
     $tags = $this->tag->getArticlesBySlug($slug);
     //$this->cache->put($key, $tags);
     return $tags;
 }
 public function save()
 {
     $setting = Setting::where('lang', getLang())->first() ?: new Setting();
     $formData = Input::all();
     unset($formData['_token']);
     $json = json_encode($formData);
     $setting->fill(array('settings' => $json, 'lang' => getLang()))->save();
     //Notification::success('Settings was successfully updated');
     return Redirect::route('admin.settings');
 }