Example #1
0
 /**
  * 
  * {@inheritDoc}
  */
 public function load(ObjectManager $manager)
 {
     $cms = new cms();
     $cms->setHeading('Here lies a heading');
     $cms->setLink('http://imgur.com/cylQ780');
     $cms->setImage('http://i.imgur.com/cylQ780.png');
     $manager->persist($cms);
     $manager->flush();
 }
Example #2
0
function Page($id = null, $vs = 0)
{
    if ($id === null) {
        return cms::$MainPage ? cms::$MainPage : cms::PageFromRequest();
    }
    return cms::Page($id, $vs);
}
Example #3
0
 public function action_vars()
 {
     $this->response->headers('Content-Type', 'application/javascript; charset=utf-8');
     echo 'url = "' . cms::url() . '/";';
     echo 'siteurl = "' . URL::site('/', true) . '/";';
     echo 'tinymceurl = "' . cms::url('media/libs/tiny_mce/tiny_mce.js') . '";';
     echo 'ajaxurl = "' . cms::url('ajax/', true) . '/";';
 }
Example #4
0
 public function action_index()
 {
     $this->template = View::factory('themes/' . THEMES . '/index');
     $this->template->csspath = './application/views/themes/' . THEMES . '/';
     $this->template->post_list_as_div = '';
     $this->template->smart_title = cms::factory()->smart_title();
     $this->template->mainmenu_as_ul = cms::factory()->mainmenu_as_ul();
     $this->request->response = $this->template;
 }
Example #5
0
 public function action_imgedit()
 {
     $file = ORM::factory('file', $this->request->param('id'));
     if (!$file->loaded()) {
         notes::add('error', 'Filen blev ikke fundet!');
         cms::redirect('files');
     }
     $this->load_css('media/libs/jcrop/css/jquery.Jcrop.min.css');
     $this->load_script('media/libs/jcrop/js/jquery.Jcrop.min.js');
     $this->bind('file', $file);
 }
Example #6
0
 public function before()
 {
     $this->template = View::factory('media/themes/admin/template/index');
     $this->template->csspath = 'media/themes/admin/';
     $this->template->logo = URL::site() . 'media/images/logo.gif';
     $this->template->css = array(array('css' => URL::site() . 'media/themes/admin/css/ui/jquery-ui.css', 'media' => 'screen'), array('css' => URL::site() . 'media/themes/admin/css/layout.css', 'media' => 'screen'), array('css' => URL::site() . 'media/themes/admin/css/ui.tabs.css', 'media' => 'screen'));
     $this->template->script = array(array('script' => URL::site() . 'media/themes/admin/js/stuff.js'), array('script' => URL::site() . 'media/vendor/jquery/jquery-1.4.2.min.js'), array('script' => URL::site() . 'media/vendor/jquery/ui/ui.tree.js'));
     $this->template->navigation = array(array('url' => URL::site() . 'admin/home', 'nav' => '信息面板'), array('url' => URL::site() . 'admin/modules', 'nav' => '模块管理'), array('url' => URL::site() . 'admin/users', 'nav' => '用户管理'), array('url' => URL::site() . 'admin/settings', 'nav' => '设置'));
     $this->template->dialog = '';
     $this->template->post_list_as_div = '';
     $this->template->login = '******';
     $this->template->smart_title = cms::factory()->smart_title();
     $this->template->mainmenu_as_ul = cms::factory()->mainmenu_as_ul();
 }
Example #7
0
 public function get_icon()
 {
     switch ($this->ext) {
         case 'txt':
             $icon = 'text.png';
             break;
         case 'zip':
         case 'tar.gz':
         case 'tar.gz2':
         case 'rar':
         case '7z':
             $icon = 'archive.png';
             break;
         case 'doc':
         case 'docx':
         case 'rtf':
         case 'pdf':
             $icon = 'document.png';
             break;
         case 'xls':
         case 'xlsx':
         case 'xml':
             $icon = 'spreadsheet.png';
             break;
         case 'js':
         case 'css':
         case 'php':
             $icon = 'code.png';
             break;
         case 'ogg':
         case 'flv':
         case 'f4v':
         case 'wmv':
             $icon = 'video.png';
             break;
         case 'mp3':
         case 'wav':
             $icon = 'audio.png';
             break;
         default:
             $icon = 'default.png';
             break;
     }
     return cms::url('media/img/file-icons/' . $icon);
 }
Example #8
0
 public static function breadcrumbs($values)
 {
     $len = count($values);
     $html = '<ul class="breadcrumb">';
     $i = 1;
     $html .= '<li>';
     $html .= '<a href="' . cms::url() . '" title="CMS">CMS</a>';
     $html .= '</li>';
     foreach ($values as $name => $url) {
         if ($len == $i) {
             $html .= '<li class="active">' . $name . '</li>';
         } else {
             $html .= '<li><a href="' . $url . '" title="' . $name . '">' . $name . '</a></li>';
         }
         $i++;
     }
     $html .= '</ul>';
     return $html;
 }
Example #9
0
 static function install($module)
 {
     self::checkInstalled();
     if (!preg_match('/cms\\.backend\\.(.+)/', $module, $matches)) {
         return false;
     }
     $parts = explode('.', $matches[1]);
     $parentModule = 'cms.backend';
     foreach ($parts as $part) {
         $m = $parentModule . '.' . $part;
         //if (!qq::$module[$m]) { qg::need($m) }
         if (!cms::PageByModule($m)) {
             $Parent = cms::PageByModule($parentModule)->Page;
             $Page = $Parent->createChild(array('module' => 'cms.layout.backend', 'visible' => 1, 'access' => 0, 'offline' => 0))->Cont(1)->setModule($m);
         }
         $parentModule = $m;
     }
     return cms::PageByModule($module)->Page;
 }
Example #10
0
 public function action_index()
 {
     $limit = 20;
     $type = arr::get($_GET, 'role', false);
     $usercount = ORM::factory('User')->count_all();
     $numpages = ceil($usercount / $limit);
     $page = arr::get($_GET, 'p', 1);
     if ($page > $numpages) {
         $page = $numpages;
     }
     $page = $page - 1;
     if ($page < 0) {
         $page = 0;
     }
     $offset = $page * $limit;
     $users = ORM::factory('User');
     $counter = ORM::factory('User');
     $currentrole = false;
     if ($type) {
         $currentrole = ORM::factory('Role')->where('name', '=', $type)->find();
         $users = $currentrole->users;
         $counter = $currentrole->users;
     }
     $numresults = $counter->count_all();
     $users = $users->offset($offset)->limit($limit)->find_all();
     $userarr = array();
     if ((bool) $users->count()) {
         foreach ($users as $user) {
             $userarr[] = $user->info();
         }
     }
     $roles = ORM::factory('Role')->find_all();
     $rolesarr = array();
     if ((bool) $roles->count()) {
         foreach ($roles as $role) {
             $rolesarr[] = $role->info();
         }
     }
     $view = View::factory('Cms/Users/index', array('roles' => $roles));
     $view->pagination = cms::pagination($numresults, '#/users', $limit);
     reply::ok($view, 'users', array('viewModel' => 'viewModels/Users/index', 'userCount' => $usercount, 'limit' => $limit, 'users' => $userarr, 'page' => $page, 'roles' => $rolesarr, 'role' => $type));
 }
Example #11
0
    while ($folder = $cms->get_folder($folder_id)) {
        $path = '/<a href="' . $_SERVER['PHP_SELF'] . '?folder_id=' . $folder['id'] . '">' . $folder['name'] . '</a>' . $path;
        $folder_id = $folder['parent_id'];
    }
    return $path;
}
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
$cms_settings = $cms->get_settings($GO_SECURITY->user_id);
if (isset($_REQUEST['new_sort_order']) && $_REQUEST['new_sort_order'] != $cms_settings['sort_order']) {
    $cms->set_sorting($GO_SECURITY->user_id, $_REQUEST['new_sort_field'], $_REQUEST['new_sort_order']);
    $cms_settings['sort_order'] = $_REQUEST['new_sort_order'];
    $cms_settings['sort_field'] = $_REQUEST['new_sort_field'];
}
if ($cms_settings['sort_order'] == "DESC") {
    $image_string = '&nbsp;<img src="' . $GO_THEME->image_url . 'buttons/arrow_down.gif" border="0" />';
    $new_sort_order = "ASC";
} else {
    $image_string = '&nbsp;<img src="' . $GO_THEME->image_url . 'buttons/arrow_up.gif" border="0" />';
    $new_sort_order = "DESC";
}
//adjust sorting because folders because they lack some columns
switch ($cms_settings['sort_field']) {
Example #12
0
	static function anchor($controls,$title=null)
	{
		if (!cms::admin()) return '';
		return cmsGui::anchor($controls,$title);
	}
/*
  Copyright Intermesh 2003
  Author: Merijn Schering <*****@*****.**>
  Version: 1.0 Release date: 08 July 2003

  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.
*/
require "../../Group-Office.php";
$cms_module = $GO_MODULES->get_module('cms');
require $GO_CONFIG->class_path . 'filetypes.class.inc';
require $cms_module['class_path'] . 'cms.class.inc';
$cms = new cms();
$filetypes = new filetypes();
if ($file = $cms->get_template_file($_REQUEST['template_file_id'])) {
    $browser = detect_browser();
    //header('Content-Length: '.$file['size']);
    header('Expires: ' . gmdate('D, d M Y H:i:s') . ' GMT');
    if ($browser['name'] == 'MSIE') {
        header('Content-Type: ' . $file['content_type']);
        header('Content-Disposition: inline; filename="' . $file['name'] . '"');
        header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
        header('Pragma: public');
    } else {
        header('Content-Type: ' . $file['content_type']);
        header('Pragma: no-cache');
        header('Content-Disposition: inline; filename="' . $file['name'] . '"');
    }
Example #14
0
<?php

namespace qg;

$useLayouts = $Cont->vs['type'] === 'p';
$modules = $useLayouts ? cms::getLayouts() : cms::getModules();
?>
<div id=qgCMSModuleChange>
<?php 
foreach ($modules as $name => $path) {
    ?>
	<?php 
    $vs = D()->row("SELECT * FROM module WHERE name = '" . $name . "'");
    if (!$vs['access'] && !Usr()->superuser) {
        continue;
    }
    $text = is_file($path . 'description.txt') ? file_get_contents($path . 'description.txt') : '';
    $img = is_file($path . '/preview.png') ? 'background-image:url(' . appURL . 'view/module/' . $name . '/preview.png);' : '';
    ?>
	<div style="cursor:pointer" name="<?php 
    echo $name;
    ?>
" class="cmsListItem <?php 
    echo $Cont->vs['module'] === $name ? 'active' : '';
    ?>
">
		<?php 
    if (is_file($path . 'pub/64.png')) {
        ?>
			<img src="<?php 
        echo path2uri($path);
Example #15
0
 function Bough($filter = false)
 {
     if ($this->Bough === null) {
         $this->Bough = array();
         $this->Bough[$this->id] = $this;
         foreach ($this->Childs(array('type' => '*')) as $Child) {
             $this->Bough += $Child->Bough();
         }
     }
     if ($filter) {
         return cms::filter($this->Bough, $filter);
     }
     return $this->Bough;
 }
Example #16
0
 public function action_delete()
 {
     $content = ORM::factory('Content', $this->request->param('id'));
     if (!$content->loaded()) {
         notes::error('Indholdet blev ikke fundet. Er det allerede blevet slettet?');
         cms::redirect('');
     }
     try {
         $type = $content->contenttype_id;
         $content->delete();
         cms::redirect('content/index/' . $type);
     } catch (HTTP_Exception_Redirect $e) {
         throw $e;
     } catch (exception $e) {
         notes::error('Der opstod en fejl og indholdet kunne ikke slettes: ' . $e->getMessage());
         cms::redirect('content/index/' . $content->id);
     }
 }
Example #17
0
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.
*/
//load Group-Office
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//load the CMS module class library
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$template_id = isset($_REQUEST['template_id']) ? $_REQUEST['template_id'] : 0;
if ($template_id > 0) {
    $template = $cms->get_template($template_id);
    if (!$GO_SECURITY->has_permission($GO_SECURITY->user_id, $template['acl_write'])) {
        header('Location: ' . $GO_CONFIG->host . 'error_docs/403.php');
        exit;
    }
}
//create a tab window
$tpl_table = new tabtable('template_tab', $cms_theme, '100%', '100%', '100', '', true);
switch ($task) {
    case 'save_template':
Example #18
0
 function insertBefore($page, $before = null)
 {
     $Page = cms::Page($page);
     $OldParent = $Page->Parent();
     $Before = cms::Page($before);
     if ($this->in($Page)) {
         return false;
     }
     $type = $Page->vs['type'];
     $sort = null;
     $i = 0;
     foreach ($this->Childs(array('type' => $type)) as $Child) {
         if ($Page === $Child) {
             continue;
         }
         if ($Before === $Child) {
             $sort = $i++;
         }
         $Child->set(array('sort' => $i++));
     }
     $sort = $sort !== null ? $sort : $i++;
     $Page->set(array('basis' => $this, 'sort' => $sort));
     // clear cache
     $Page->Parent = $Page->Path = null;
     $this->Childs = $this->Bough = $this->Named = null;
     $OldParent->Childs = $OldParent->Bough = $OldParent->Named = null;
     $Page->urlsSeoGen();
     //cms::buildLftRgt();
     return true;
 }
Example #19
0
		echo cms::anchor($c);
	?>
	<div style="float:right;">
		<? if (!core::req('.hide-image')): ?>
			<img src="sample.jpg" style="max-width:400px; margin-left:2em;">
		<? endif ?>
	</div>
	<?php 
echo core::vars('text1');
?>
</div>

<? if(cms::admin()): ?>
	<?
		$c= cms::context() -> label('Edit') -> icon('edit') -> popup(core::url('edit-block','no',2)) -> popuptitle('Edit text block 2');
		echo cms::anchor($c,'Block 2');
	?>
	<div>
			<h1><?php 
echo core::vars('headline2');
?>
</h1>
			<h2><?php 
echo core::vars('subheadline2');
?>
</h2>
			<?php 
echo core::vars('text2');
?>
	</div>
<? endif ?>
Example #20
0
	static function start() /// Launches whole the action after configuration read
	{
		error_reporting(core::$config['error-reporting-lo']);

		foreach ($_COOKIE as $var=>$val) core::$req[$var]= $val;
		if (isset(core::$config['cookie-vars'])) foreach (core::$config['cookie-vars'] as $var=>$config)
		{
			core::$req[$var]= core::filter(core::req($var),$config);
		}

		foreach ($_GET as $var=>$val) if ($var!==session_name()) core::$req[$var]= core::$reqUrl[$var]= $val;
		unset(core::$reqUrl[core::config('module-var')]);
		foreach ($_POST as $var=>$val) if ($var!==session_name()) core::$req[$var]= $val;
		foreach ($_FILES as $var=>$val)
		{
			if (is_string($val['name'])) core::$req[$var]= $val;  // <input type=file name=xxx ...>
			else  // <input type=file name=xxx[yyy] ...>
			{
				foreach ($val['name'] as $key=>$void)
				{
		 			core::$req[$var][$key]= array(
						'name'=>$val['name'][$key],
						'type'=>$val['type'][$key],
						'tmp_name'=>$val['tmp_name'][$key],
						'error'=>$val['error'][$key],
						'size'=>$val['size'][$key]
					);
				}
			}
		}

		if (isset(core::$config['cookie-vars'])) foreach (core::$config['cookie-vars'] as $name=>$config) 
		{
			if (isset(core::$req[$name]))
			{
				core::$req[$name]= core::filter(core::$req[$name], $config);
				if (!isset($_COOKIE[$name]) || $_COOKIE[$name]!=core::$req[$name])
				{
					setcookie($name, core::$req[$name], $config['expire']);
				}
				unset(core::$reqUrl[$name]);
			}
		}
		
		// apply required vars
		if (isset(core::$config['required'])) foreach (core::$config['required'] as $name=>$config)
		{
			core::$req[$name]=  core::filter(core::$req[$name],$comfig);
			core::$reqUrl[$name]= core::$req[$name];
		}
		
		if (!core::moduleName())
		{
			if (is_array(core::$config['default-module']))
			{
				$args= href::processArgs(core::$config['default-module']);
				core::$req[core::$config['module-var']]= $args['template'];
				array_merge(core::$reques,$args['req']);
			}
		}
		core::$req[core::$config['module-var']]= str_replace('..','(dot)(dot)',core::moduleName()); //secure upper directories
		core::$req[core::$config['module-var']]= str_replace("\0",'(0)',core::moduleName()); //secure
		core::$req[core::$config['module-var']]= str_replace('<','(lt)',core::moduleName()); //secure
		core::$req[core::$config['module-var']]= str_replace('>','(gt)',core::moduleName()); //secure

		// set session var
		if (core::req(session_name()) || isset(core::$config['session-vars']))
		{
			if (!session_id()) session_start();
			foreach ($_SESSION as $name=>$val) core::$req[$name]= $val;
			if (isset(core::$config['session-vars'])) foreach (core::$config['session-vars'] as $name=>$config)
			{
				core::$req[$name]= core::filter(core::req($name),$config);
				unset(core::$reqUrl[$name]);
			}
		}

		if (core::req('cms-oper')) cms::perform();
		elseif (core::req('core-module')=='cms-resource') cmsGui::forward(core::req('file'));

		ob_start();
		if (isset(core::$config['pre-models'])) foreach(core::$config['pre-models'] as $model) core::model($model);
		core::insert(core::moduleName());
		$buffer= ob_get_contents();
		ob_end_clean();

		// Process pre- and post-templates
		if (!core::reg('run-naked'))
		{
			ob_start();
			if (isset(core::$config['pre-module'])) core::insert(core::$config['pre-module']);
			echo $buffer;
			if (isset(core::$config['post-module'])) core::insert(core::$config['post-module']);
			if (isset(core::$config['post-models'])) foreach(core::$config['post-models'] as $model) core::model($model);
			$buffer= ob_get_contents();
			ob_end_clean();
		}
		
		// Output
		echo $buffer;
		//if (core::$prepend) core::error('one or more prepends were not utilized: '.implode(',',array_keys(core::$prepend)));
	}	
Example #21
0
<?php

session_start();
include_once 'config/db_conn.php';
include_once 'db_config/db_catagory.php';
include_once 'db_config/db_user.php';
include_once 'db_config/db_cms.php';
$cms = new cms();
$rs_cms = $cms->uniq_cms_list("id", "3");
$user = new user();
$rs_user = $user->user_list();
$i = 0;
$data_cms = mysql_fetch_array($rs_cms);
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title><?php 
echo SITE_TITLE;
?>
</title>
<link href="css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/jquery.min.js"></script>
<script type="text/javascript" src="javascript/jquery.simplemodal.js"></script>
<script type="text/javascript" src="javascript/init.js"></script>
<script type="text/javascript" src="javascript/init1.js"></script>
<link type='text/css' href='css/stylesheet.css' rel='stylesheet' media='screen' />
<link type='text/css' href='css/basic.css' rel='stylesheet' media='screen' />
Example #22
0
<?php

echo cms::breadcrumbs(array('Filer' => cms::url('files'), 'Rediger fil' => cms::url('files/edit/' . $file->id), 'Billedredigering' => ''));
?>

<div class="page-header">
	<h1>Rediger billede</h1>
</div>

<div class="row-fluid">
	<div class="span8">
		<p>
			Træk på billedet for at beskære
		</p>
		<input type="hidden" data-orgimg="<?php 
echo url::site('files/' . $file->filename());
?>
" id="imgdata" value="" />
		<div id="image" data-fileid="<?php 
echo $file->id;
?>
">
			<img id="theimg" data-angle="0" src="<?php 
echo url::site('files/' . $file->filename());
?>
" />
		</div>
		<div class="text-right">
			<a href="#" class="btn hide btn-primary" id="crop-btn">Beskær</a>
		</div>
	</div>
Example #23
0
			<div class="widget">
				<div class="widget-header">
					<div class="pull-left widget-tool widget-tool-left widget-mover">
						<span class="glyphicon glyphicon-move"></i>
					</div>
					<h3 class="widget-title" data-bind="text:widgettype.display"></h3>
					<div class="widget-tool pull-right">
						<a href="#" class="block-deleter" data-bind="click:$parent.deleteWidget" title="Slet">
							<span class="glyphicon glyphicon-trash"></span>
						</a>
					</div>
				</div>
				<div class="widget-body">
					<div data-bind="if:loading()">
						<img src="<?php 
echo cms::url('media/img/ajax-loader-widget.gif');
?>
" alt="Loader" />
					</div>
					<div class="widget-content-holder">
						
						<?php 
// Site stats
?>
						<div data-bind="if:widgettype.type=='sitestats'">
							<p>
								New users the past 24 hours: <span data-bind="text:newusers"></span>
							</p>
							<p>
								Total number of pages: <span data-bind="text:pages"></span>
							</p>
Example #24
0
<div class="cmsAddModule">
	<?php 
foreach (cms::getModules() as $name => $path) {
    ?>
		<?php 
    $vs = D()->row("SELECT * FROM module WHERE name = '" . $name . "'");
    if (!$vs['access'] and !Usr()->superuser) {
        continue;
    }
    if ($name === 'cms.cont.flexible') {
        continue;
    }
    ?>
 
		<div id="addMocule_<?php 
    echo $name;
    ?>
" class="cmsListItem" >
			
			<?php 
    if (is_file($path . 'pub/64.png')) {
        ?>
				<img src="<?php 
        echo path2uri($path);
        ?>
pub/64.png" style="float:left; display:block" alt="" />
			<?php 
    } else {
        ?>
				<img src="<?php 
        echo sysURL;
Example #25
0
<html>
	<head>
		<meta http-equiv="content-type" content="text/html; charset=utf-8">
		<?php 
echo core::prepend('head');
?>
	</head>
	<body>
		<?
			$c= cms::context();
			$c-> label('Test if  data files writable') -> icon('offline_pin') -> popup(core::url('test-files'));
			$c-> label('To ConKit project page') -> icon('cloud') -> url("https://github.com/stanpro/conkit");
			echo cms::anchorGlobal($c);
		?>
		<fieldset>
			<legend>Header (see head.tpl.php)</legend>
			<div>
				<img src="logo.png" style="width:100px; vertical-align:middle; margin-right:2em; margin-left:3em;">
				<a href="<?php 
echo cms::loginUrl();
?>
">Login</a>
			</div>
		</fieldset>
		
		<fieldset style="padding:3em;">
			<legend>Body template (see <?php 
echo core::moduleName();
?>
.tpl.php)</legend>
Example #26
0
<?php

include_once 'config/db_conn.php';
include_once 'db_config/db_gigs.php';
include_once 'db_config/db_cms.php';
$cid = $_REQUEST['cid'];
$cms = new cms();
$rs_cms = $cms->uniq_cms_list("id", $cid);
if ($_REQUEST['submit']) {
    $table = 'ninerr_cms';
    $dataArray = array("cms_content" => $_REQUEST['cms_content']);
    $fldArray = array("id" => $_REQUEST['id']);
    $cms->dataUpdate($table, $dataArray, $fldArray);
    reDirect('cms.php');
    //header ("Location: cms.php");
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Orders - Admin</title>
<link rel="stylesheet" type="text/css" href="css/theme.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<script>
   var StyleFile = "theme" + document.cookie.charAt(6) + ".css";
   document.writeln('<link rel="stylesheet" type="text/css" href="css/' + StyleFile + '">');
</script>
<!-- TinyMCE -->
<script type="text/javascript" src="tiny_mce/tiny_mce.js"></script>
<script type="text/javascript">
Example #27
0
</div>
<?php 
require "common/preLoadWidgets.php";
?>
<div style="text-align: center; clear:both; margin-top: 20px;">
<a href="/index.php">home</a> | 
<a href="/contactus.php">contact us </a>
<?php 
$cms = new cms("cms");
$pages = $cms->getStaticPage();
if (is_array($pages)) {
    foreach ($pages as $page) {
        echo " | <a href='/cms.php?filename=" . $page['filename'] . "'>" . $page['menuname'] . "</a>";
    }
}
?>
</div>
<br />
</body>
</html>
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.
*/
//load Group-Office
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//load the CMS module class library
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
require $GO_THEME->theme_path . 'header.inc';
echo '<input type="hidden" name="template_file_id" />';
echo '<input type="hidden" name="task" />';
echo '<table border="0" cellpadding="3" cellspacing="0"><tr>';
echo '<td width="16">&nbsp;</td>';
echo '<td width="100" nowrap><h3>' . $strName . '</h3></td>';
echo '<td width="100" nowrap><h3>' . $strType . '</h3></td></tr>';
//list the files
$total_size = 0;
$count_files = $cms->get_template_files($_REQUEST['template_id']);
while ($cms->next_record()) {
    $total_size += $cms->f('size');
    $short_name = cut_string($cms->f('name'), 30);
Example #29
0
  This program is free software; you can redistribute it and/or modify it
  under the terms of the GNU General Public License as published by the
  Free Software Foundation; either version 2 of the License, or (at your
  option) any later version.
*/
//load Group-Office
require "../../Group-Office.php";
//authenticate the user
$GO_SECURITY->authenticate();
//see if the user has access to this module
//for this to work there must be a module named 'example'
$GO_MODULES->authenticate('cms');
//load the CMS module class library
require $GO_MODULES->class_path . 'cms.class.inc';
$cms = new cms();
//get the language file
require $GO_LANGUAGE->get_language_file('cms');
$site_id = isset($_REQUEST['site_id']) ? $_REQUEST['site_id'] : 0;
$task = isset($_REQUEST['task']) ? $_REQUEST['task'] : '';
$search_word_id = isset($_REQUEST['search_word_id']) ? $_REQUEST['search_word_id'] : 0;
$return_to = isset($_REQUEST['return_to']) ? $_REQUEST['return_to'] : 'index.php';
$root_publish_path = $GO_CONFIG->get_setting('cms_publish_path');
if ($_SERVER['REQUEST_METHOD'] == 'POST' && $task == 'save_site') {
    $domain = $cms->prepare_domain(smart_addslashes(trim($_POST['domain'])));
    $name = smart_addslashes(trim($_POST['name']));
    if ($domain == '' || $name == '') {
        $feedback = '<p class="Error">' . $error_missing_field . '</p>';
    } else {
        if ($_POST['site_id'] > 0) {
            if (!($site = $cms->get_site($_POST['site_id']))) {
Example #30
0
        html::addJSFile(sysURL . 'cms/pub/js/dropPaste.js', 'cms/edit');
        html::addJSFile(sysURL . 'cms/pub/js/dropPasteHelper.js', 'cms/edit');
        html::addJSFile(sysURL . 'cms/pub/js/panel.js', 'cms/edit');
        html::addJSFile(sysURL . 'cms/pub/js/tree.js', 'cms/edit');
        html::addJSFile(sysURL . 'cms/pub/js/contextmenu.js', 'cms/edit');
        //html::addJSFile( sysURL.'cms/pub/js/help.js',                 'cms/edit');
        html::addCSSFile(sysURL . 'core/css/q1Rst.css', 'cms/edit');
        html::addCSSFile(sysURL . 'cms/pub/css/main.css', 'cms/edit');
        html::addCSSFile(sysURL . 'cms/pub/css/panel.css', 'cms/edit');
        html::addCSSFile(sysURL . 'cms/pub/css/tree.css', 'cms/edit');
    } else {
        html::addCSSFile(sysURL . 'cms/pub/css/off.css', 'cms/noEdit');
    }
});
qg::on('render', function () {
    cms::render();
});
qg::on('action', function () {
    if (isset($_GET['qgCms_editmode'])) {
        G()->SET['cms']['editmode']->setUser($_GET['qgCms_editmode']);
    }
    if (isset($_FILES['cmsPageFile'])) {
        if ($_FILES['cmsPageFile']['error']) {
            Answer(false);
        }
        $image_fix_orientation = function ($filename) {
            // todo: preserve exif
            if (exif_imagetype($filename) !== 2) {
                return;
            }
            $exif = exif_read_data($filename);