static function showInput($S)
 {
     $value = !$S->count() ? $S->get() : array();
     switch ($S->getHandler()) {
         case 'checkbox':
             return '<input name="' . $S->i . '" type=checkbox ' . ($value ? 'checked' : '') . '>';
         case 'select':
             return '<select name="' . $S->i . '">' . helper_optionsFromArray($S->getOptions(), $value, 0) . '</select>';
         case 'range':
             $opts = $S->getOptions();
             if (isset($opts[1])) {
                 // deprecated
                 $vs['min'] = $opts[0];
                 $vs['max'] = $opts[1];
                 if (isset($opts[2])) {
                     $vs['step'] = $opts[2];
                 }
             } else {
                 $vs = $opts[0];
             }
             if (!isset($vs['step'])) {
                 $vs['step'] = 'any';
             }
             $atts = array();
             foreach ($vs as $n => $v) {
                 $atts[] = $n . '="' . $v . '"';
             }
             return '<input name="' . $S->i . '" type=range ' . implode(' ', $atts) . ' value="' . hee($value) . '">';
         case 'number':
             $opts = $S->getOptions();
             $vs = isset($opts[0]) ? $opts[0] : array();
             if (!isset($vs['step'])) {
                 $vs['step'] = 'any';
             }
             $atts = array();
             foreach ($vs as $n => $v) {
                 $atts[] = $n . '="' . $v . '"';
             }
             return '<input name="' . $S->i . '" type=number ' . implode(' ', $atts) . ' value="' . hee($value) . '">';
         case 'text':
             return '<textarea name="' . $S->i . '">' . hee($value) . '</textarea>';
         default:
             switch ($S->getType()) {
                 case 'bool':
                     return '<input type=checkbox name="' . $S->i . '" ' . ($value ? 'checked' : '') . '>';
                 case 'int':
                     return '<input type=number name="' . $S->i . '" value="' . hee($value) . '">';
                 default:
                     if (!is_array($value)) {
                         return '<input type=text name="' . $S->i . '" value="' . hee($value) . '">';
                     } else {
                         return '<input type=hidden name="' . $S->i . '">';
                     }
             }
     }
 }
예제 #2
0
 static function getHeader()
 {
     $return = '<meta charset=utf-8>' . "\n";
     $return .= '<title>' . hee(self::$titlePrefix . self::$title . self::$titleSuffix) . '</title>' . "\n";
     $return .= self::$head;
     foreach (self::$meta as $name => $value) {
         if ($value === '') {
             continue;
         }
         $return .= '<meta name=' . $name . ' content="' . $value . '">' . "\n";
     }
     $return .= self::_getHeaderCSSFiles();
     $return .= self::_getHeaderJSFiles();
     $return .= trim(self::$css) ? '<style>' . self::$css . '</style>' . "\n" : '';
     return $return;
 }
예제 #3
0
 function init()
 {
     if (is_file(appPATH . 'qg/' . $this->mod . '/pub/main.js')) {
         html::addJsFile(appURL . 'qg/' . $this->mod . '/pub/main.js');
     }
     html::addCssFile(appURL . 'qg/' . $this->mod . '/pub/base.css', 'dr8og', false);
     html::addCssFile(appURL . 'qg/' . $this->mod . '/pub/custom.css', 'dr8og', false);
     if ($gFont = $this->getLayoutPage()->SET['google-font']->v) {
         $gFont = str_replace('|', '%7C', $gFont);
         // rawurlencode ?
         html::$head .= '<link rel=stylesheet href="' . hee($gFont) . '">';
     }
     if ($this->LPage->edit) {
         html::addJsFile(sysURL . 'cms.layouter3/pub/qgElSty/qgCssProps.js', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/qgElSty/q1CssText.js', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/qgElSty/qgStyleEditor.js', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/qgElSty/qgStyleSheetEditor.js', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/qgElSty/spectrum.js', '43l5k');
         html::addCssFile(sysURL . 'cms.layouter3/pub/qgElSty/spectrum.css', '43l5k', 0);
         html::addCssFile(sysURL . 'cms.layouter3/pub/qgElSty/main.css', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/plupload/js/plupload.full.js', '43l5k');
         html::addJsFile(sysURL . 'cms.layouter3/pub/edit.js', '43l5k');
     }
 }
예제 #4
0
    }
    if (preg_match('/\\/Zend\\//', $search)) {
        continue;
    }
    if (preg_match('/\\/cache\\//', $search)) {
        continue;
    }
    if (!is_file($datei)) {
        continue;
    }
    $file = realpath($datei);
    $_SESSION['fileEditor']['allow'][$file] = 1;
    $src = appURL . 'editor?file=' . urlencode($file);
    ?>
<tr><td><a href="<?php 
    echo hee($src);
    ?>
" target=<?php 
    echo md5($file);
    ?>
><?php 
    echo $show;
    ?>
</a><td><?php 
    echo strftime('%x %X', filemtime($file));
}
?>
      	</table>
	</div>

</div>
예제 #5
0
</b>
			<td>
			<td>
	<tbody>
		<?php 
foreach (D()->query("SELECT * FROM page_url WHERE page_id = '" . $Cont . "' ") as $vs) {
    ?>
			<tr data-lang="<?php 
    echo $vs['lang'];
    ?>
">
				<td><?php 
    echo $vs['lang'];
    ?>
				<td style="border-right:none"><input class=-url type=text value="<?php 
    echo hee($vs['url']);
    ?>
" style="width:100%">
				<td style="width:1px; border-left:none"><input class=-custom type=checkbox <?php 
    echo $vs['custom'] ? 'checked' : '';
    ?>
 title=fix>
				<td style="width:10px"><input class=-target <?php 
    echo $vs['target'] ? 'checked' : '';
    ?>
 type=checkbox title="<?php 
    echo L('Neues Fenster');
    ?>
">
		<?php 
}
예제 #6
0
<?php

$separator = hee($Cont->SET['breadcrumb separator']->v);
$separator = str_replace(' ', '&nbsp;', $separator);
$separator = $separator ? $separator : ' - ';
$previewImage = $Cont->SET['preview image']->setType('bool')->v;
if ($previewImage) {
    $previewImageQuery = $Cont->SET->make('preview image query', '/w-120/h-400/max/')->v;
}
foreach ($res as $id => $r) {
    $C = Page($id);
    $P = $C->Page;
    $href = $C->url();
    ?>
	<div class=-item>

		<?php 
    if ($previewImage) {
        foreach ($C->Files() as $F) {
            if (!image::able($F->path)) {
                continue;
            }
            echo '<a href="' . $href . '"><img src="' . $F->url() . '/' . $previewImageQuery . '/' . $F->name() . '"></a>';
            break;
        }
    }
    ?>
		
		<a href="<?php 
    echo $href;
    ?>
예제 #7
0
     if ($value !== false) {
         $checked = $value === $v ? ' checked ' : '';
     }
     echo '<label><input type=checkbox id="l' . $id . '" name="' . $id . '"' . $required . $checked . ' value="' . hee($v) . '"> ' . $Cont->text($id . '_value') . '</label>';
     break;
 case 'radio':
     foreach (explode(';', $Cont->text($id . '_value')) as $option) {
         $option = hee(trim($option));
         $checked = $value === $option ? ' checked' : '';
         echo '<label><input type=radio value="' . $option . '" name="' . $id . '"' . $required . $checked . '> ' . preg_replace('/\\([^)]\\)$/', '', $option) . ' </label>';
     }
     break;
 case 'select':
     echo '<select id="l' . $id . '" name="' . $id . '"' . $required . '>';
     foreach (explode(';', $Cont->text($id . '_value')) as $option) {
         $option = hee(trim($option));
         echo '<option value="' . $option . '" ' . ($value === $option ? 'selected' : '') . '>' . preg_replace('/\\([^)]\\)$/', '', $option) . '</option>';
     }
     echo '</select>';
     break;
 case 'description':
     $T = $Cont->text($id . '_desc');
     echo '<div ' . ($Cont->edit ? 'contenteditable cmstxt=' . $T->id : '') . '>' . $T . '</div>';
     break;
 case 'email':
     echo '<input value="' . $value . '" type=email class=input id="l' . $id . '" name="' . $id . '"' . $required . '>';
     break;
 case 'url':
     echo '<input value="' . $value . '" type=url   class=input id="l' . $id . '" name="' . $id . '"' . $required . '>';
     break;
 default:
예제 #8
0
    if (!$cl || isset($classes[$cl])) {
        continue;
    }
    $classes[$cl] = $vs;
}
?>
		<?php 
foreach ($classes as $class => $vs) {
    ?>
			<label style="min-width:80px; flex-basis:auto; margin:1px; background:#fff; padding:3px; border:1px solid #eee; cursor:pointer; border-radius:3px ">
				<input type=checkbox <?php 
    echo !isset($vs['count']) ? 'checked' : '';
    ?>
 class="-added" style="vertical-align:bottom;">
				<span><?php 
    echo hee($class);
    ?>
</span>
			</label>
		<?php 
}
?>
	</div>
</div>

<script>
$('.qgCmsPageClasses').on('change','.-added', function() {
	var fn = this.checked?'addClass':'removeClass';
	$fn('page::'+fn)(<?php 
echo $Cont;
?>
예제 #9
0
    if (G()->SET->has($M->name) || G()->SET['m']->has($M->name)) {
        ?>
					<img src="<?php 
        echo sysURL;
        ?>
cms/pub/css/pix/settings.png" title="<?php 
        echo L('Einstellungen');
        ?>
" style="vertical-align:middle" alt=Einstellungen>
				<?php 
    }
    ?>
			</a>
		<td>
			<input value="<?php 
    echo hee($M->Title());
    ?>
" onchange="moduleSetTitle(this,'<?php 
    echo $M;
    ?>
')">
		<td>
			<?php 
    if (preg_match('/^cms\\.(backend|cont|layout)\\./', $M->name)) {
        echo D()->one("SELECT count(*) FROM page WHERE module = " . D()->quote($M->name));
    }
    ?>
		<td style="text-align:center">
			<input onclick="moduleSetAccess(this,'<?php 
    echo $M;
    ?>
예제 #10
0
}
?>
<table style="width:100%" class=noWrap>
<?php 
foreach ($Ls as $pid => $L) {
    ?>
	<tr>
		<td>
			<?php 
    echo qgCms_link($pid);
    ?>
		<td style="width:160px; color:<?php 
    echo Usr()->id == $L->sess()->usr()->id ? 'red' : '';
    ?>
" title="<?php 
    echo hee($L->sess()->usr()->firstname . ' ' . $L->sess()->usr()->lastname);
    ?>
">
			<?php 
    echo $L->sess()->usr()->email;
    ?>
		<?php 
    $d = strftime('%d', $L->time);
    $m = strftime('%m', $L->time);
    $Y = strftime('%Y', $L->time);
    $H = strftime('%H', $L->time);
    $M = strftime('%M', $L->time);
    $nd = strftime('%d');
    $nm = strftime('%m');
    $nY = strftime('%Y');
    $nH = strftime('%H');
예제 #11
0
 static function logDetails($id)
 {
     $id = (int) $id;
     $row = D()->row("SELECT * FROM log WHERE id = " . $id);
     if ($row['post']) {
         $post = unserialize($row['post']);
         $ask = $post['askJSON'];
         $data = json_decode($ask, 1);
         $translateFn = array('page::addContent' => 'Inhalt hinzugefügt', 'page::insertBefore' => 'Position geändert', 'page::setDefault' => 'Einstellung geändert', 'page::FilesSort' => 'Dateireihenfolge geändet', 'page::addDbFile' => 'Datei hinzugefügt', 'page::copy' => 'Kopiert', 'page::remove' => 'Gelöscht.');
         $ContOrPage = function ($Page) {
             $title = trim(strip_tags($Page->Title()));
             $title = $title ? '"' . $title . '"' : '';
             return ($Page->vs['type'] === 'p' ? 'Seite' : 'Inhalt') . ' ' . $title . ' (' . $Page->id . ') :<br>';
         };
         $messages = array();
         foreach ($data['serverInterface'] as $call) {
             $fn = $call['fn'];
             $args = $call['args'];
             if ($fn === 'cms::getTree' || $fn === 'page::getWidgetContent' || $fn === 'Setting' || $fn === 'page::reload') {
                 continue;
             }
             if (strpos($fn, 'page::') === 0) {
                 $Page = Page($args[0]);
                 $messages[] = $ContOrPage($Page) . ' ' . (isset($translateFn[$fn]) ? $translateFn[$fn] : $fn);
             } else {
                 if ($fn === 'cms::setTxt') {
                     if ($vs = D()->row("SELECT name, page_id FROM page_text WHERE text_id = " . (int) $args[0] . " ")) {
                         $Page = Page($vs['page_id']);
                         $messages[] = $ContOrPage($Page) . '  Text "' . hee($vs['name']) . '" geändert';
                     } else {
                         if ($vs = D()->row("SELECT id FROM page WHERE title_id = " . (int) $args[0] . " ")) {
                             $Page = Page($vs['id']);
                             $messages[] = $ContOrPage($Page) . ' Titel geändert';
                         }
                     }
                 } else {
                     if ($fn === 'cms_vers::rollBackCont') {
                         $Page = Page($args[0]);
                         $messages[] = $ContOrPage($Page) . ' Stand zurückgesetzt';
                     } else {
                         $messages[] = $fn;
                     }
                 }
             }
         }
         $Log = D()->log->Entry($row);
         $Sess = Sess($Log->sess_id);
         $Usr = $Sess->Usr();
         $Client = D()->client->Entry($Sess->client_id);
         $email = $Usr->is() ? $Usr->email : 'guest';
         $ua = $Client->browser;
         // ua to browser
         $str = $ua;
         $str = preg_replace('/Trident.+rv:([0-9.]+)/', 'IE/$1', $str);
         $str = preg_replace('/Version\\/([0-9.]+).+Safari\\/([0-9.]+).+/', 'Safari/$1', $str);
         $str = preg_replace('/MSIE ([0-9.]+)/', 'IE/$1', $str);
         $str = preg_replace('/Edge\\//', 'IE/', $str);
         $str = preg_replace('/(Mozilla|AppleWebKit|Trident|Gecko)\\//', '', $str);
         preg_match('/([a-zA-Z]+)\\/([0-9]+\\.[0-9])/', $str, $matches);
         if ($matches) {
             list($x, $vendor, $version) = $matches;
             $browser = $vendor . ' ' . $version;
         } else {
             $browser = 'other';
         }
         return array('messages' => $messages, 'usr' => $email, 'url' => $Log->url, 'referer' => $Log->referer, 'ip' => $Sess->ip, 'browser' => $browser, 'time' => strftime('<b>%x</b> %H:%M', $Log->time), 'user_agent' => $ua);
     }
     //$log = D()->row;
 }
예제 #12
0
<?php

namespace qg;

if ($Cont->access() < 2) {
    return;
}
?>

<table id=qgCmsTxtsWindow>
	<?php 
foreach ($Cont->texts() as $name => $T) {
    ?>
		<tr>
			<td><?php 
    echo hee($name);
    ?>
&nbsp;
			<td style="width:70%"><div class=-txt cmstxt=<?php 
    echo $T->id;
    ?>
 contenteditable><?php 
    echo $T;
    ?>
</div>
	<?php 
}
?>
</table>

<style>
예제 #13
0
"  style="background-image:url(<?php 
echo sysURL;
?>
cms/pub/css/pix/backend.png)">
						<?php 
echo L('zum Backend');
?>
 <span>[B]</span>
					</a>
				<li>
					<a show=login style="background-image:url(<?php 
echo sysURL;
?>
cms/pub/css/pix/users.png)">
						<?php 
echo hee(Usr()->firstname . ' ' . Usr()->lastname);
?>
					</a>
				<li>
					<a show=help style="background-image:url(<?php 
echo sysURL;
?>
cms/pub/css/pix/help.png)">
						<?php 
echo L('Hilfe');
?>
					</a>
				<li>
					<a href="<?php 
echo Url()->addParam('liveUser_logout', 1);
?>
예제 #14
0
						e.target.focus();
					})
				</script>
		<tr>
			<th style="text-align:left"><?php 
echo L('Inhalt der Datei');
?>
:
			<td><textarea onchange="$fn('page::fileSetText')(<?php 
echo $Cont;
?>
,'<?php 
echo $param['name'];
?>
', this.value).run()" style="width:100%; height:200px"><?php 
echo hee($F->vs['text']);
?>
</textarea>
		<tr>
			<th style="text-align:left"><?php 
echo L('Grösse');
?>
:
			<td><?php 
echo byte_format($F->size());
?>
		<tr class="expert">
			<th style="text-align:left">Mime:
			<td>
				<input value="<?php 
echo $F->mime();
예제 #15
0
		<form method=post>
				<?php 
        if ($Cont->SET['saveLogin']->v) {
            ?>
					<input name=save_login    type=checkbox value=1 <?php 
            echo $ClientUsr->save_login ? 'checked' : '';
            ?>
>
				<?php 
        }
        ?>
				<?php 
        echo hee($Usr->email);
        ?>
				<input name=email           type=hidden value="<?php 
        echo hee($Usr->email);
        ?>
">
				<?php 
        if (!$ClientUsr->save_login) {
            ?>
					<input name=pw            type=password>
				<?php 
        }
        ?>
				<input name=liveUser_login  type=submit value=login>
		</form>
	<?php 
    }
    ?>
예제 #16
0
        Abort();
    }
} else {
    ?>
<div style="padding:15px; background-color:#ee9; color:#000; box-shadow:0 0 8px; background-image:linear-gradient(#FBFBE7,#F0F0AC)">
	<h2><?php 
    echo L('Weiterleitung');
    ?>
</h2>
	<?php 
    echo L('Interne Seite (Vorschläge) oder URL:');
    ?>
<br>

	<input value="<?php 
    echo hee($link);
    ?>
" type="qgcms-page" onblur="$fn('cms::setTxt')(<?php 
    echo $link->id;
    ?>
, $(this)[0].value); $fn('page::reload')(<?php 
    echo $Cont;
    ?>
)" style="max-width:100%; width:400px" />
	<br>
	oder:<br>
	<select onchange="$fn('cms::setTxt')(<?php 
    echo $link->id;
    ?>
, $(this).val() ); $fn('page::reload')(<?php 
    echo $Cont;
예제 #17
0
    echo $vs['email'];
    ?>
							<td> <?php 
    echo $vs['sent'] ? date('d.m.Y H:i', $vs['sent']) : '-';
    ?>
							<td> <?php 
    echo $vs['opened'] ? date('d.m.Y H:i', $vs['opened']) : '-';
    ?>
							<td> <?php 
    echo $vs['error'];
    ?>
							<td>
								<div onmouseover="this.style.maxHeight = '400px'" onmouseout="this.style.maxHeight='12px'" style="overflow:auto; max-height:12px; font-size:10px; transition:all .1s">
									<?php 
    foreach (unserialize($vs['data']) as $n => $v) {
        echo hee($n . ' : ' . $v) . '<br>';
    }
    ?>
								</div>
					<?php 
}
?>
			</table>
		</div>
	</div>

	<?php 
if (D()->mail1_track) {
    ?>
		<div style="width:auto">
			<h1>Tracking</h1>
예제 #18
0
		<?php 
    foreach ($_GET as $name => $value) {
        if (is_array($value)) {
            continue;
        }
        echo '<input type=hidden name="' . hee($name) . '" value="' . hee($value) . '">';
    }
    ?>
		<input <?php 
    echo $Cont->SET['input no autofocus']->setType('bool')->v ? '' : 'autofocus';
    ?>
 name=CmsPage<?php 
    echo $Cont;
    ?>
 value="<?php 
    echo hee($search);
    ?>
" placeholder="<?php 
    echo L('suchen');
    ?>
..." type=search>
		<button>suchen</button>
	</form>
	<?php 
}
?>
	
	<div data-part=res><?php 
include $Cont->modPath . 'parts/res.php';
?>
</div>
예제 #19
0
			margin:0 !important;
		}
		.CodeMirror { height:100%; background:#fff; }
		.CodeMirror-scroll { height:100%; }
		.CodeMirror-gutter { min-width:.5em; }
		</style>
	<body>

		<button class=q1Rst id=saveButton style="position:fixed; right:-1px; top:10px; z-index:10; padding:10px 12px; display:none;">
			<?php 
echo is_writable($file) ? 'save' : 'rechte zum speichern fehlen!';
?>
		</button>
		<div style="height:100%; width:100%">
			<textarea id=editor style="width:100%; height:100%;"><?php 
echo hee(file_get_contents($file));
?>
</textarea>
		</div>

		<?php 
$ext = preg_replace('/.*\\.([^.])/', '$1', $file);
$mime = File::extensionToMime($ext);
$mime = str_replace('application/x-javascript', 'text/javascript', $mime);
?>

		<script>
		btn = document.getElementById('saveButton');
		editorEl = document.getElementById('editor');

		saveFile = function(content){
예제 #20
0
        if ($Cont->SET['text']->v) {
            ?>
						<div class="-text" <?php 
            echo $Cont->edit ? 'contenteditable cmsTxt="' . $T->id . '"' : '';
            ?>
><?php 
            echo $T;
            ?>
</div>
					<?php 
        }
        ?>
				</div>
			<?php 
    } else {
        echo '<a data-fancybox-group=b' . $Cont . ' href="' . $F->url() . '/h-' . $b_h . '/w-' . $b_w . '/max/' . urlencode($F->name()) . '" class="fancyBoxGroup' . $Cont . '" title="' . hee(strip_tags((string) $T)) . '" ></a>';
    }
}
?>
	</div>
	
	<script>
		$(function() {
			var options = <?php 
echo $Cont->SET->getJson();
?>
;
			options.helpers = {
				title : {},
				overlay : {},
				thumbs : {},
예제 #21
0
				<tr>
					<td> Vorname:
					<td> <input name=firstname value="<?php 
echo hee($vs['firstname']);
?>
">
				<tr>
					<td> Nachname:
					<td> <input name=lastname value="<?php 
echo hee($vs['lastname']);
?>
">
				<tr>
					<td> Firma:
					<td> <input name=company value="<?php 
echo hee($vs['company']);
?>
">
				<?php 
if (Usr()->superuser) {
    ?>
				<tr>
					<td>Superuser:
					<td>
						<input type=hidden   name=superuser value=0>
						<input type=checkbox name=superuser value=1 <?php 
    echo $vs['superuser'] ? 'checked' : '';
    ?>
>
				<?php 
}
예제 #22
0
echo hee($vs['name']);
?>
"</h1>
	<div class=be_contentTextBox>
		<form method=post>
			<table class=c1-style>
				<tr>
					<td>Name:
					<td><input name=name value="<?php 
echo hee($vs['name']);
?>
" style="width:300px">
				<tr>
					<td>Type:
					<td><input name=type value="<?php 
echo hee($vs['type']);
?>
" style="width:300px">
				<tr>
					<td>Relevant für Seiten-Zugriff:
					<td>
						<input type=hidden name=page_access value=0>
						<input type=checkbox name=page_access value=1 <?php 
echo $vs['page_access'] ? 'checked' : '';
?>
>
			</table>
			<br>
			<br>
			<input type=submit name=edit value=Speichern>
		</form>
예제 #23
0
        D()->query("DELETE FROM cms_cont_notfound WHERE 1");
    }
    echo '<h2>fehlgeschlagene Anfragen</h2>';
    echo '<a href="' . Url()->addParam('delete', 1) . '">alle Löschen</a><br><br>';
    echo '<table>';
    echo '<tr><td>Request<td>Anzahl Aufrufe<td>Log-id';
    $sql = "SELECT count(t.log_id) as num, max(t.log_id) as last_log, t.request " . "FROM cms_cont_notfound t \t\t\t" . "GROUP BY request \t\t\t\t\t" . "ORDER BY num DESC, last_log DESC \t" . "LIMIT 1000\t";
    foreach (D()->query($sql) as $vs) {
        echo '<tr>';
        echo '<td>';
        $xss = strpos($vs['request'], 'javascript') !== false || strpos($vs['request'], 'script') !== false;
        if ($xss) {
            echo '<span style="color:red">xss?</span> ';
        } else {
            echo '<a href="' . hee($vs['request']) . '"> ';
        }
        echo hee($vs['request']);
        if (!$xss) {
            echo '</a>';
        }
        echo '<td>';
        echo $vs['num'];
        echo '<td>';
        echo $vs['last_log'];
    }
    echo '</table>';
}
D()->query("INSERT INTO cms_cont_notfound SET request = " . D()->quote((string) Url()) . ", log_id = " . liveLog::$id);
?>
</div>
<?php 
예제 #24
0
?>
</textarea>
<br>

<?php 
echo L('Schlüsselwörter');
?>
:
<?php 
$T = $Cont->text('_meta_keywords');
?>
<textarea style="display:block; width:100%; height:45px" cmstxt=<?php 
echo $T->id;
?>
 placeholder="ca. 15 Wörter, Komma getrannt, Schlüsselwörter werden nicht start gewichtet" rows=4 cols=70><?php 
echo hee($T);
?>
</textarea>

<style>
#cmsContentWindowContent [tab=seo] input,
#cmsContentWindowContent [tab=seo] textarea {
    padding:5px;
    border:none;
    background-color:#e8ffe8;
}
#cmsContentWindowContent [tab=seo] :invalid,
#cmsContentWindowContent [tab=seo] .-invalid {
    background-color:#ffe8e8;
}
</style>
예제 #25
0
 function getPrepared($vars = array())
 {
     $str = trim($this->getRaw($vars));
     if (!$str) {
         $str = '<div></div>';
     }
     $class = 'qgCms' . ($this->vs['type'] === 'c' ? 'Cont' : 'Page') . ' -pid' . $this . ' -m-' . str_replace('.', '-', $this->vs['module']);
     $expose = cms::classesExposeCss();
     if ($expose) {
         foreach ($this->classes() as $name => $egal) {
             if (isset($expose[$name])) {
                 $class .= ' ' . $name;
             }
         }
     }
     if ($this->edit) {
         $class .= ' -e';
         $this->Page !== Page() && ($class .= ' -foreign');
     }
     $id = '';
     if ($this->vs['type'] === 'c' && $this->vs['visible']) {
         $id = ' id="' . hee(substr($this->urlSeo(L()), 1)) . '"';
     }
     $done = null;
     //$ret = preg_replace('/^<([^>]+)class="([^"]*)"/','<$1class="$2 '.$class.'"'.$id, $str, 1, $done);
     $ret = preg_replace('/^<([^>]+)class=("([^"]*)"|([^\\s>]*))/', '<$1class="$3$4 ' . $class . '"' . $id, $str, 1, $done);
     if ($done) {
         return $ret;
     }
     $ret = preg_replace('/^<([^\\s>]+)([\\s]?)/', '<$1 class="' . $class . '"' . $id . '$2', $str, 1, $done);
     if ($done) {
         return $ret;
     }
     return '<div class="' . $class . '"' . $id . '>' . $ret . '</div>';
 }
예제 #26
0
function cmsBackendSuperuserDbField($Cont, $E, $F)
{
    $f = (string) $F;
    $value = $E->{$f};
    if ($F->Parent()) {
        ?>
		<a onclick="dbRes(<?php 
        echo $Cont;
        ?>
,{table:'<?php 
        echo $F->Parent();
        ?>
',find:{<?php 
        echo $F->Parent()->getAutoIncrement();
        ?>
:'<?php 
        echo hee($value);
        ?>
'}}); return false;" href="#">
			<?php 
        $col = D()->col("SELECT name FROM qg_db_field WHERE tab='" . $F->Parent() . "' ORDER BY name");
        foreach ($col as $x) {
            echo $F->Parent()->Entry($value)->{$x} . ' ';
        }
        if (!$col) {
            echo hee($value);
        }
        ?>
		</a>
	<?php 
    } elseif ($F->isPrimary()) {
        ?>
		<b><?php 
        echo $value;
        ?>
</b>
	<?php 
    } else {
        ?>
		<?php 
        if ($F->getTyp() == 'tinyint' && $F->getLength() == 1) {
            ?>
			<input class=qgDbField type=checkbox <?php 
            echo $value ? 'checked' : '';
            ?>
 value=1>
		<?php 
        } elseif ($F->getTyp() === 'text') {
            ?>
			<textarea class=qgDbField><?php 
            echo hee($value);
            ?>
</textarea>
		<?php 
        } else {
            ?>
			<input class=qgDbField value="<?php 
            echo hee($value);
            ?>
">
		<?php 
        }
        ?>
	<?php 
    }
}
예제 #27
0
function helper_optionsFromArray($array, $selected = array(), $use_index = true)
{
    $selected = (array) $selected;
    $str = '';
    foreach ($array as $i => $v) {
        $value = $use_index ? $i : $v;
        $select = in_array($value, $selected) ? 'selected' : '';
        $str .= '<option value="' . hee($value) . '" ' . $select . '>' . hee($v) . '</option>';
    }
    return $str;
}
예제 #28
0
    echo $is ? '<a href="mailto:' . $vs['email'] . '">' : '';
    ?>
				<?php 
    echo hee($vs['email']);
    ?>
			<?php 
    echo $is ? '</a>' : '';
    ?>
		<td> <?php 
    echo hee($vs['company']);
    ?>
		<td> <?php 
    echo $vs['active'] ? 'yes' : 'no';
    ?>
		<td> <?php 
    echo hee($stat['sessions']);
    ?>
		<?php 
    if (Usr()->superuser) {
        ?>
			<td>
				<a href="<?php 
        echo Url($Cont->Page->url())->addParam('loginAs', $vs['id']);
        ?>
">
					<img src="<?php 
        echo sysURL;
        ?>
cms/pub/css/pix/user_go.png" title="Login als user" style="display:inline; cursor:pointer;" alt=login>
				</a>
		<?php