Esempio n. 1
0
echo getHtmlMenu($CI->cache->file->get('MENU_PROFILE_' . json_encode($groups)), 'menuProfile nav navbar-nav navbar-right');
?>
			</div>
		</div>
	</nav>

	<nav class="menu label-primary">
		<div>
<?php 
echo getHtmlMenu($CI->cache->file->get('MENU_PUBLIC_' . json_encode($groups)), 'menuPublic');
?>
		</div>
	</nav>
	<div class="container pageContainer ">
		<div class="cr-page <?php 
echo getPageName();
?>
">
<?php 
if (!empty($breadcrumb)) {
    echo '<ol class="breadcrumb">';
    foreach ($breadcrumb as $link) {
        if (element('active', $link) == true) {
            echo '<li class="active">' . $link['text'] . '</li>';
        } else {
            echo '<li><a title="' . $link['text'] . '" href="' . $link['href'] . '">' . $link['text'] . '</a></li>';
        }
    }
    echo '</ol>';
}
if (!isset($showTitle)) {
Esempio n. 2
0
          <input type="number" class="form-control" name="mobile" id="inputPassword3" data-error="Please Enter Mobile Number" placeholder="Mobile Number" required>
        </div>
      </div>
      
      <div class="form-group">
        <div class="col-sm-12">
          <input type="email" class="form-control" id="inputPassword3" name="email" placeholder="Email"  data-error="Please Enter Email"required>
        </div>
      </div>
       <input type="text" name="my_data" id="my_data" style="display:none;" >
      <?php 
function getPageName()
{
    return substr($_SERVER["SCRIPT_NAME"], strrpos($_SERVER["SCRIPT_NAME"], "/") + 1);
}
$query_from_page = getPageName();
?>
        <input type="hidden" class="form-control"  name="query_from_page" value="<?php 
echo $query_from_page;
?>
">
      <div class="form-group">
        <div class="col-sm-12">
         <textarea placeholder="Your Query" name="query"></textarea>
           <div id="course_feature"></div>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-12">
          <button type="submit"  name="submit" value="submit" class="btn btn-default org_btn btn_query">Submit Query</button>
        
<?php

$pages = array('menu', 'game', 'rules', 'ranking');
if (isset($_GET['page']) && $_GET['page'] != '' || isset($_GET['error'])) {
    if (in_array($_GET['page'], $pages)) {
        $page = $_GET['page'];
        $page_name = getPageName($page) . ' | ';
    } else {
        require_once 'errors.php';
        exit;
    }
} else {
    $page = 'menu';
}
function getPageName($page)
{
    switch ($page) {
        case 'game':
            return 'Jeux';
            break;
        case 'rules':
            return 'Règles';
            break;
        case 'ranking':
            return 'Classement';
            break;
        default:
            return '';
            break;
    }
}
Esempio n. 4
0
<?php

include 'config.php';
include 'function.php';
$pagename = strtolower(getPageName());
$pagedata = array();
if ($pagename != '404.php') {
    if (isset($_SESSION["login"])) {
        /* Privilege Check */
        $fuser_id = $mysqli->real_escape_string($_SESSION['login']['user_id']);
        $privCheck = privilegeCheck($mysqli, $pagename, $fuser_id);
        if ($privCheck['result'] == 'success') {
            $pagedata = $privCheck['data'];
            $fpageid = $pagedata['id'];
            $flogindate = date("Y-m-d H:i:s");
            $query = "UPDATE tuser SET user_status = 'Online', module_id = '{$fpageid}', user_accessdate = '{$flogindate}' WHERE user_id='{$fuser_id}'";
            if (!($result = $mysqli->query($query))) {
                printf("Errormessage: %s\n", $mysqli->error);
            }
        } else {
            if ($privCheck['result'] == '404') {
                header("Location: 404.php");
            } else {
                echo $privCheck['message'];
            }
        }
    } else {
        header("Location: login.php?err=1");
    }
} else {
    $pagedata = array('category' => '404', 'name' => 'Error Page');
Esempio n. 5
0
 function exportDir($dirid, $dirpath, &$i)
 {
     global $_lang;
     global $base;
     global $modx;
     global $limit;
     global $dbase;
     global $table_prefix;
     global $sqlcond;
     $sql = "SELECT id, alias, pagetitle, isfolder, (content = '' AND template = 0) AS wasNull, editedon FROM {$dbase}.`" . $table_prefix . "site_content` WHERE {$dbname}.`" . $table_prefix . "site_content`.parent = " . $dirid . " AND " . $sqlcond;
     $rs = mysql_query($sql);
     $dircontent = array();
     while ($row = mysql_fetch_assoc($rs)) {
         if (!$row['wasNull']) {
             // needs writing a document
             $docname = getPageName($row['id'], $row['alias'], $modx->config['friendly_url_prefix'], $suffix = $modx->config['friendly_url_suffix']);
             printf($_lang['export_site_exporting_document'], $i++, $limit, $row['pagetitle'], $row['id']);
             $filename = $dirpath . $docname;
             if (is_dir($filename)) {
                 removeDirectoryAll($filename);
             }
             if (!file_exists($filename) || filemtime($filename) < $row['editedon']) {
                 if (!writeAPage($base, $row['id'], $filename)) {
                     exit;
                 }
             } else {
                 echo '<p><span class="success">' . $_lang['export_site_success'] . "</span> " . $_lang["export_site_success_skip_doc"] . '</p>';
             }
             $dircontent[] = $docname;
         }
         if ($row['isfolder']) {
             // needs making a folder
             $dirname = $dirpath . $row['alias'];
             if (!is_dir($dirname)) {
                 if (file_exists($dirname)) {
                     @unlink($dirname);
                 }
                 mkdir($dirname);
                 if ($row['wasNull']) {
                     printf($_lang['export_site_exporting_document'], $i++, $limit, $row['pagetitle'], $row['id']);
                     echo '<p class="success">' . $_lang['export_site_success'] . '</p>';
                 }
             } else {
                 if ($row['wasNull']) {
                     printf($_lang['export_site_exporting_document'], $i++, $limit, $row['pagetitle'], $row['id']);
                     echo '<p><span class="success">' . $_lang['export_site_success'] . $_lang["export_site_success_skip_dir"] . '</p>';
                 }
             }
             exportDir($row['id'], $dirname . "/", $i);
             $dircontent[] = $row['alias'];
         }
     }
     // remove No-MODx files/dirs
     if (!scanDirectory($dirpath, $dircontent)) {
         exit;
     }
     //		print_r ($dircontent);
 }
Esempio n. 6
0
function getPagePath($id) {
	$result = $_SERVER["DOCUMENT_ROOT"]."/modules/portada/main.php";

	if ($id > 0) {
		$params = array(":id" => $id);
		$sql =
			"SELECT pi_ruta
				 FROM web.wpi_paginasintranet
				WHERE pi_id = :id";
		$result = $_SERVER["DOCUMENT_ROOT"]."/".valorSql($sql, "", $params);

		// Dibujo el título..
		echo '<div id="divFondoSeccion" style="'.getCabecera().'"><div id="divTituloSeccion">'.getPageName($id).'</div></div>';
	}

	return $result;
}
Esempio n. 7
0
function renderIndexItem($ypageno)
{
    echo !permitted($ypageno) ? "          <td>&nbsp;</td>\n" : "          <td>\n" . "            <h1><a href='" . makeHref(array('page' => $ypageno)) . "'>" . getPageName($ypageno) . "<br>\n" . getImageHREF($ypageno) . "</a></h1>\n" . "          </td>\n";
}
Esempio n. 8
0
<?php

include '../config.php';
include '../function.php';
$alert = array();
$isSuccess = true;
if (isset($_POST)) {
    $currURL = $mysqli->real_escape_string($_POST['href']);
    $fhref = getPageName($currURL);
    $fcurrpage = getCurrentPageData($mysqli, $fhref);
    $fcommand = $mysqli->real_escape_string($_POST['command']);
    /* Checking Access Rights */
    if ($fcommand == 'create' && $_SESSION['access'][$fcurrpage['id']]['create'] == 1 || $fcommand == 'update' && $_SESSION['access'][$fcurrpage['id']]['update'] == 1) {
        $go = true;
        $fid = $mysqli->real_escape_string(strtoupper($_POST['id']));
        $ftable = $mysqli->real_escape_string($_POST['table']);
        $fidfield = $mysqli->real_escape_string($_POST['id_field']);
        $fstatusfield = $mysqli->real_escape_string($_POST['status_field']);
        $fdeletefield = $mysqli->real_escape_string($_POST['delete_field']);
        $fdate = date('Y-m-d H:i:s');
        $query = "UPDATE {$ftable} SET \n\t\t\t\t\t\t\t\t\t{$fstatusfield}='posted'\n\t\t\t\t\t\t\t\tWHERE {$fidfield}='{$fid}' AND {$fdeletefield} IS NULL";
        if ($result = $mysqli->query($query)) {
            $alert[] = array('type' => 'success', 'message' => 'Transaksi berhasil di Posting.');
        } else {
            $alert[] = array('type' => 'danger', 'message' => "Errormessage: " . $mysqli->error);
            $isSuccess = false;
        }
    } else {
        $alert[] = array('type' => 'warning', 'message' => 'You dont have right to do this!!!');
        $isSuccess = false;
    }
Esempio n. 9
0
function getDesign($design)
{	if(empty($design)) return ''; $d = getDesignCache($design); if($d !== false) return $d;
	global $nofollow,$last_design,$need_fix_name,$redis,$noDesignCache,$currentDesign,$designPath,$commonDesignPath,$currentLangage;
	$noDesignCache=0; $currentDesign=$design;
	if($design == 'nofolow'){ $nofollow=1; $need_fix_name=1; return ''; } else if($design == 'folow'){ $nofollow=0; return ''; } if($nofollow) { return '[$$]'.$design.'[$$]'; }

	if(false === strstr($design,'|'))
	{	// search design in the template folder, absolute path with lang prefix
		$path = template.'/'.$designPath.'/'.$currentLangage.'.'.$design.'.php'; // template folder
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in the template folder, absolute path
		$path = template.'/'.$designPath.'/'.$design.'.php'; // template folder
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in redis keys, absolute path with lang prefix
		$path = redisPrefix.':design:'.template.'/'.$designPath.'/'.$currentLangage.'.'.$design;
		$d = $redis->get($path); if(false !== $d){setDesignCache($design,$d);return $d;}

		// search design in the common template folder, absolute path with lang prefix
		$path = template.'/'.common_path.$commonDesignPath.'/'.$currentLangage.'.'.$design.'.php';
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in the common template folder, absolute path
		$path = template.'/'.common_path.$commonDesignPath.'/'.$design.'.php';
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in the common template folder, just file, no path, lang prefix
		$path = template.'/'.common_path.'/'.$currentLangage.'.'.$design.'.php';
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in the common template folder, just file, no path
		$path = template.'/'.common_path.'/'.$design.'.php';
		if(is_file($path)){ob_start();include($path);$d=ob_get_contents();ob_end_clean();setDesignCache($design,$d);return $d;}

		// search design in constant files
		global $global_constants,$seedPath,$seedKey;
		if(!isset($global_constants))
		{	$global_constants = array();
			// common constants
			$path = template.'/'.common_path.'/'.design_path;
			if(is_file($path)) $constants = parse_ini_file($path,true);

			// page specific constants
			$path = template.'/'.$seedKey.'/'.design_path;
			if(is_file($path)) $constants = array_merge_recursive($constants,parse_ini_file($path,true));
			if(isset($constants))
			{	//print '<pre>';print_r($constants);print '</pre>';
				foreach($constants as $name=>$sub)
				{	if($name == $currentLangage || $name == 'common')
						foreach($sub as $cnt=>$val) $global_constants[$cnt] = $val;
				}
			}
		}

		if(isset($global_constants[$design])){$d=$global_constants[$design];setDesignCache($design,$d);return $d;}
	}
	else
	{	$args = explode('|',$design);
		$mdl = array_shift($args);
		$fn = 'fn_'.$mdl;
		ob_start();
		global $currentPlugin; $cplg=$currentPlugin; $currentPlugin=$mdl;
		if(function_exists($fn)) $fn($args);
		else	{	$path = site_full_path.'/'.module_path.'/'.$mdl.'/'.$mdl.'.php';
				if(is_file($path))
				{	include($path); if(function_exists($fn)) $fn($args);
				} else die('plugin '.$mdl.' not found ! path : '.$path);
			}
		$currentPlugin=$cplg;
		$out = ob_get_contents(); ob_end_clean();
		setDesignCache($design,$out); return $out;
	}

	// design is finally not found !
	//if(isUserPrivilege('show-error'))
	{	// css error msg
		//addToRenderOnce('style','span.red{color:red;} span.big{font-style:italic;font-weight:bold}');
		// generate html to draw some page info
		return '<p>design <span class="red big">'.$design.'</span> not found!</p><p>page : <span class="big">'.getPageName().'</span> language : <span class="big">'.getLang().'</span></p><p>cache search : '.$designPath.'/'.$design.'</p><p><span class="big">/</span> for file search is relative at <span class="big">'.site_full_path.'</span></br><br/>physical file possible path, ordered by engine search priority :</br><ul><li>'.site_url.template.'/'.$designPath.'/'.$currentLangage.'.'.$design.'.php</li><li>'.site_url.template.'/'.$designPath.'/'.$design.'.php</li><li>'.site_url.template.'/'.common_path.$commonDesignPath.'/'.$currentLangage.'.'.$design.'.php</li><li>'.site_url.template.'/'.common_path.$commonDesignPath.'/'.$design.'.php'.'</li><li>'.site_url.common_path.$commonDesignPath.'/'.$currentLangage.'.'.$design.'.php<li>'.site_url.common_path.$commonDesignPath.'/'.$design.'.php</li><li>'.site_url.template.'/'.common_path.'/'.$currentLangage.'.'.$design.'.php</li><li>'.site_url.template.'/'.common_path.'/'.$design.'.php</li><li>'.site_url.common_path.'/'.$currentLangage.'.'.$design.'.php</li><li>'.site_url.common_path.'/'.$design.'.php</li></ul><br/>constant files url :</br><ul><li>'.site_url.template.'/'.$seedKey.'/'.design_path.'</li><li>'.site_url.template.'/'.common_path.'/'.design_path.'</li></ul></p>';
	}// else return '';
}
function writeProgressBar()
{
    $page_num = substr(getPageName(), 0, 2);
    //get page number, assign to var
    $total_pages = 54;
    $progress_int = $page_num / $total_pages * 100;
    // workout progress as percentage, assign to var
    ?>

    <div class="progress">
        <div class="progress-bar progress-bar-success progress-bar-striped" role="progressbar" aria-valuenow="<?php 
    echo $progress_int;
    ?>
" aria-valuemin="0" aria-valuemax="100" style="width: <?php 
    echo $progress_int;
    ?>
%">
            <span class="sr-only"><?php 
    echo $progress_int;
    ?>
% Complete (success)</span>
        </div>
    </div>
    <?php 
}
Esempio n. 11
0
        @($THEME_NAME = "themes/" . $properties->DB_PREFIX . "/exempt/");
    } else {
        while ($FETCH_THEME_NAME = mysql_fetch_array($GET_THEME_NAME)) {
            @($THEME_NAME = "themes/" . $FETCH_THEME_NAME['name'] . "/exempt/");
        }
    }
} else {
    @($THEME_NAME = "themes/" . str_replace("(THEME_NAME)", Theme($properties, $REPLACEMENT_THE_ACTION, $ip, $SESSIONID), $THEME_ASSETS_STRING) . "/exempt/");
}
?>
<title><?php 
echo $properties->WEBSITE_NAME;
?>
 - <?php 
echo getSlogan($properties, $launchpadPN);
echo getPageName($launchpadPN, $page, $properties);
?>
</title>

<link rel="stylesheet" type="text/css" href="<?php 
echo $WEBSITE_URL;
echo @$THEME_NAME;
?>
mainall/main.css" media="screen" >
<?php 
if (@$launchpadPN == "pad1") {
    ?>
<link rel="stylesheet" type="text/css" href="<?php 
    echo $WEBSITE_URL;
    echo @$THEME_NAME;
    ?>
Esempio n. 12
0
<?php

$result = array('pageName' => getPageName());
if (isset($notRefresh)) {
    $result['notRefresh'] = $notRefresh;
}
if (isset($showTitle)) {
    $result['showTitle'] = $showTitle;
}
if (!isset($meta)) {
    $meta = array();
}
$result['meta'] = getMetaByController($meta);
if (!isset($breadcrumb)) {
    $breadcrumb = array();
}
$result['breadcrumb'] = getBreadcrumb($breadcrumb, $result['meta'], isset($skipBreadcrumb) ? $skipBreadcrumb : false);
switch ($view) {
    case 'includes/crList':
        $result['js'] = 'crList';
        $result['list'] = $list;
        break;
    case 'includes/crForm':
        $form = appendMessagesToCrForm($form);
        $result['js'] = 'crForm';
        $result['form'] = $form;
        break;
    default:
        $result['html'] = $this->load->view($view, '', true);
        $result['html'] .= $this->my_js->getHtml();
}
function create_sefurl($url)
{
    global $boardurl, $modSettings, $PortaMxSEF;
    if (!empty($modSettings['pmxportal_disabled']) || !empty($modSettings['pmxsef_disabled'])) {
        return $url;
    }
    // Init..
    $sefstring = $sefstring1 = $sefstring2 = '';
    $query_parts = array();
    // Get the query string
    $params = array();
    $url_parts = parse_url($url);
    // security .. check illegal url's
    parse_str(!empty($url_parts['query']) ? preg_replace('~&(\\w+)(?=&|$)~', '&$1=', strtr($url_parts['query'], array('&amp;' => '&', ';' => '&'))) : '', $params);
    if (!empty($params)) {
        // check ingnore actions
        if (!empty($params['action']) && in_array($params['action'], $PortaMxSEF['ignoreactions'])) {
            return $url;
        }
        // check ingnore requests
        $tmp = array_intersect(array_keys($params), array_keys($PortaMxSEF['ignorerequests']));
        if (count($tmp) == 1 && ($tmp = current($tmp)) && $params[$tmp] == $PortaMxSEF['ignorerequests'][$tmp]) {
            return $url;
        }
        // boards or topics
        if (isset($params['board'])) {
            $sefstring .= getBoardName($params['board']);
            unset($params['board']);
        } elseif (isset($params['topic'])) {
            $sefstring .= getTopicName($params['topic']);
            unset($params['topic']);
        }
        // actions
        if (isset($params['action'])) {
            if (in_array($params['action'], array_values($PortaMxSEF['aliasactions']))) {
                $acts = array_flip($PortaMxSEF['aliasactions']);
                $params['action'] = $acts[$params['action']];
            } elseif (!in_array($params['action'], array_merge($PortaMxSEF['actions'], array('theme', 'language')))) {
                preg_match('/[a-zA-Z0-9\\_\\-]+/', $params['action'], $action);
                if (!empty($action[0])) {
                    $PortaMxSEF['actions'][] = $action[0];
                }
            }
            $sefstring .= $params['action'] . '/';
            unset($params['action']);
            // user
            if (isset($params['u'])) {
                $sefstring .= $params['u'] == 'all' ? $params['u'] . '.0/' : getUserName($params['u']);
                unset($params['u']);
            }
        } elseif (isset($params['cat'])) {
            // root cat
            if (isset($params['cat'])) {
                $sefstring .= getCategoryName($params['cat']);
                unset($params['cat']);
            }
            //child cat?
            if (isset($params['child'])) {
                $sefstring .= getCategoryName($params['child'], true);
                unset($params['child']);
            }
            // have article?
            if (isset($params['art'])) {
                $sefstring .= getArticleName($params['art']);
                unset($params['art']);
            }
        } elseif (isset($params['art'])) {
            $sefstring .= getArticleName($params['art']);
            unset($params['art']);
        } elseif (isset($params['spage'])) {
            $sefstring .= getPageName($params['spage']);
            unset($params['spage']);
        }
        // single request token
        foreach ($PortaMxSEF['singletoken'] as $key) {
            if (array_key_exists($key, $params) && $params[$key] == '') {
                $sefstring2 .= $key . '/';
                unset($params[$key]);
            }
        }
        // do the rest
        foreach ($params as $key => $value) {
            if ($key == 'start') {
                $sefstring2 .= $value != '' ? $key . '/' . $value . '/' : '';
            } elseif (is_array($value)) {
                $sefstring1 .= $key . '[' . key($value) . ']/' . $value[key($value)] . '/';
            } else {
                $sefstring1 .= $key . '/' . $value . '/';
            }
        }
        // Build the URL
        if (isset($query_parts['action'])) {
            $sefstring .= $query_parts['action'] . '/';
        }
        $sefstring .= $sefstring1 . $sefstring2;
    }
    return $boardurl . '/' . $sefstring . (!empty($url_parts['fragment']) ? '#' . $url_parts['fragment'] : '');
}
Esempio n. 14
0
function getConfiguredQuickLinks()
{
    $ret = array();
    foreach (explode(',', getConfigVar('QUICK_LINK_PAGES')) as $page_code) {
        if (!empty($page_code)) {
            $title = getPageName($page_code);
            if (!empty($title)) {
                $ret[] = array('href' => makeHref(array('page' => $page_code)), 'title' => $title);
            }
        }
    }
    return $ret;
}
Esempio n. 15
0
function renderMyQuickLinks()
{
    global $indexlayout, $page;
    startPortlet('Items to display in page header');
    echo '<div style="text-align: left; display: inline-block;">';
    printOpFormIntro('save');
    echo '<ul class="qlinks-form">';
    $active_items = explode(',', getConfigVar('QUICK_LINK_PAGES'));
    foreach ($indexlayout as $row) {
        foreach ($row as $ypageno) {
            $checked_state = in_array($ypageno, $active_items) ? 'checked' : '';
            echo "<li><label><input type='checkbox' name='page_list[]' value='{$ypageno}' {$checked_state}>" . getPageName($ypageno) . "</label></li>\n";
        }
    }
    echo '</ul>';
    printImageHREF('SAVE', 'Save changes', TRUE);
    echo '</form></div>';
    finishPortlet();
}
Esempio n. 16
0
function chechUserPermissions($page)
{
    $page = getPageName($page);
    $user_id = $_SESSION['USER_ID'];
    if ($_SESSION["SAdmin"] == 1) {
        //Super admin
        return 1;
    } else {
        if ($user_id == 1) {
            //Admin
            $sql = "select count(*)c from \n\t\tlogin_modules g , \n\t\tlogin_modules m ,\n\t\tlogin_modules f \n\t\twhere \n\t\tf.file='{$page}' and \n\t\tf.m_id=m.id and \n\t\tf.g_id=g.id and \t\t\n\t\tm.active=1 and\n\t\tg.active=1 ";
            $res = mysql_query($sql);
            return mysql_result($res, 0, 'c');
        } else {
            $sql = "select count(*)c from \n\t\tlogin_modules g , \n\t\tlogin_modules m ,\n\t\tlogin_modules f ,\n\t\tlogin_users u,\n\t\tlogin_groups grp,\n\t\tlogin_groups_permissions p \n\t\twhere \n\t\tf.file='{$page}' and \n\t\tf.m_id=m.id and \n\t\tf.g_id=g.id and \t\t\n\t\tm.active=1 and\n\t\tg.active=1 and\t\t\n\t\tu.user_id='{$user_id}' and \n\t\tu.active=1 and\n\t\tu.grp_id=grp.grp_id and \n\t\tgrp.grp_id=p.group and \n\t\tp.module=m.id";
            $res = mysql_query($sql);
            return mysql_result($res, 0, 'c');
        }
    }
}
Esempio n. 17
0
				<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> %s </div>
				<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6"> %s </div>
			</div>';
    if ($form['info']['position'] == 'left') {
        $htmlFields = sprintf($row, $form['info']['html'], implode(' ', $aFields));
    } else {
        $htmlFields = sprintf($row, implode(' ', $aFields), $form['info']['html']);
    }
} else {
    $htmlFields = implode(' ', $aFields);
}
if (!isset($form['buttons'])) {
    $form['buttons'] = array();
    $form['buttons'][] = '<button type="button" class="btn btn-default" onclick="$.goToUrlList();"><i class="fa fa-arrow-left"></i> ' . lang('Back') . ' </button> ';
    if (isset($form['urlDelete'])) {
        $form['buttons'][] = '<button type="button" class="btn btn-danger"><i class="fa fa-trash-o"></i> ' . lang('Delete') . ' </button>';
    }
    $form['buttons'][] = '<button type="submit" class="btn btn-primary" disabled="disabled"><i class="fa fa-save"></i> ' . lang('Save') . ' </button> ';
}
if (!empty($form['buttons'])) {
    $htmlButtons = '<div class="formButtons panel-footer" > ' . implode(' ', $form['buttons']) . '</div>';
}
echo form_open($form['action'], array('class' => $form['frmName'] . ' ' . element('className', $form, 'panel panel-default crForm form-horizontal'), 'role' => 'form')) . $htmlTitle . '
	<div class="panel-body">
		' . $htmlErrors . '
		' . $htmlFields . '
	</div>
	' . $htmlButtons . '
	' . form_close();
$this->my_js->add(' $(\'.' . getPageName() . ' .' . $form['frmName'] . '\').crForm(' . json_encode($form) . '); ');