本文整理汇总了PHP中rex_create_lang函数的典型用法代码示例。如果您正苦于以下问题:PHP rex_create_lang函数的具体用法?PHP rex_create_lang怎么用?PHP rex_create_lang使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rex_create_lang函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: msg
function msg($key, $p0 = '', $p1 = '', $p2 = '', $p3 = '', $p4 = '', $p5 = '', $p6 = '', $p7 = '', $p8 = '', $p9 = '')
{
global $REX;
if (isset($this->text[$key])) {
$msg = $this->text[$key];
} else {
$msg = '';
}
// falls der key nicht gefunden wurde, auf die fallbacksprache switchen
if ($msg == '') {
if (!$this->isFallback()) {
// fallbackobjekt ggf anlegen
if (!$this->isFallback() && $this->fallback == null) {
$this->fallback = rex_create_lang($this->fallback_locale, $this->searchpath);
}
// suchen des keys in der fallbacksprache
return $this->fallback->msg($key, $p0, $p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9);
} else {
trigger_error('Schluessel "' . $key . '" konnte weder in der ausgewälten noch in der Fallbacksprache gefunden werden!', E_USER_ERROR);
}
}
$patterns = array('/\\{0\\}/', '/\\{1\\}/', '/\\{2\\}/', '/\\{3\\}/', '/\\{4\\}/', '/\\{5\\}/', '/\\{6\\}/', '/\\{7\\}/', '/\\{8\\}/', '/\\{9\\}/');
$replacements = array($p0, $p1, $p2, $p3, $p4, $p5, $p6, $p7, $p8, $p9);
return preg_replace($patterns, $replacements, $msg);
}
示例2: rex_parse_article_name
/**
* URL Funktionen
* @package redaxo4
* @version svn:$Id$
*/
function rex_parse_article_name($name)
{
static $firstCall = true;
static $search, $replace;
if ($firstCall) {
global $REX, $I18N;
// Im Frontend gibts kein I18N
if (!$I18N) {
$I18N = rex_create_lang($REX['LANG']);
}
// Sprachspezifische Sonderzeichen Filtern
$search = explode('|', $I18N->msg('special_chars'));
$replace = explode('|', $I18N->msg('special_chars_rewrite'));
$firstCall = false;
}
return str_replace('+', '-', urlencode(preg_replace('/ {2,}/', ' ', preg_replace('/[^a-zA-Z_\\-0-9 ]/', '', str_replace($search, $replace, $name)))));
}
示例3: _formatStrftime
static function _formatStrftime($value, $format)
{
global $I18N;
if (!is_object($I18N)) {
$I18N = rex_create_lang();
}
if (empty($value)) {
return '';
}
if ($format == '' || $format == 'date') {
// Default REX-Dateformat
$format = $I18N->msg('dateformat');
} elseif ($format == 'datetime') {
// Default REX-Datetimeformat
$format = $I18N->msg('datetimeformat');
}
return strftime($format, $value);
}
示例4: configurePackage
protected function configurePackage()
{
global $REX, $I18N;
self::arraySet($this->package, 'rex.backend', $REX['REDAXO']);
self::arraySet($this->package, 'rex.user', $REX['USER']);
$REX['ADDON']['rxid'][$this->package['name']] = '';
$REX['ADDON']['name'][$this->package['name']] = $this->package['title'];
$REX['ADDON']['version'][$this->package['name']] = $this->package['version'];
$REX['ADDON']['author'][$this->package['name']] = $this->package['author'];
$REX['ADDON']['supportpage'][$this->package['name']] = $this->package['supportpage'];
$REX['ADDON']['perm'][$this->package['name']] = $this->package['permission_startpage'];
$REX['ADDON']['pages'][$this->package['name']] = self::arrayGet($this->package, 'package.pages');
if ($this->package['permission'] != '') {
$REX['PERM'][] = $this->package['permission'];
}
if (count($this->package['permission_options']) > 0) {
$REX['EXTPERM'][] = $this->package['permission_options'];
}
if (!is_object($I18N)) {
$I18N = rex_create_lang($REX['LANG']);
}
$package_lang_dirs = self::arrayGet($this->package, 'package.providers.i18n');
$package_lang_dirs[] = self::arrayGet($this->package, 'path.package') . '/lang';
if (count($package_lang_dirs)) {
foreach ($package_lang_dirs as $package_lang_dir) {
if (is_dir($package_lang_dir)) {
$I18N->appendFile($package_lang_dir);
}
}
}
}
示例5: rex_create_lang
// login failed
$rex_user_loginmessage = $REX['LOGIN']->message;
// Fehlermeldung von der Datenbank
if (is_string($loginCheck)) {
$rex_user_loginmessage = $loginCheck;
}
$REX['PAGES']['login'] = rex_be_navigation::getLoginPage();
$REX['PAGE'] = 'login';
$REX['USER'] = null;
$REX['LOGIN'] = null;
} else {
// Userspezifische Sprache einstellen, falls gleicher Zeichensatz
$lang = $REX['LOGIN']->getLanguage();
$I18N_T = rex_create_lang($lang, '', FALSE);
if ($I18N->msg('htmlcharset') == $I18N_T->msg('htmlcharset')) {
$I18N = rex_create_lang($lang);
}
$REX['USER'] = $REX['LOGIN']->USER;
}
}
// ----- Prepare Core Pages
if ($REX['USER']) {
$REX['PAGES'] = rex_be_navigation::getLoggedInPages($REX['USER']);
}
// ----- INCLUDE ADDONS
include_once $REX['INCLUDE_PATH'] . '/addons.inc.php';
// ----- Prepare AddOn Pages
if ($REX['USER']) {
foreach (OOAddon::getAvailableAddons() as $addonName) {
$title = OOAddon::getProperty($addonName, 'name', '');
$href = OOAddon::getProperty($addonName, 'link', 'index.php?page=' . $addonName);
示例6: checkLogin
/**
* Prüft die mit setLogin() und setPassword() gesetzten Werte
* anhand des LoginQueries/UserQueries und gibt den Status zurück
*
* Gibt true zurück bei erfolg, sonst false
*/
function checkLogin()
{
global $REX, $I18N;
if (!is_object($I18N)) {
$I18N = rex_create_lang();
}
// wenn logout dann header schreiben und auf error seite verweisen
// message schreiben
$ok = false;
if (!$this->logout) {
// LoginStatus: 0 = noch checken, 1 = ok, -1 = not ok
// checkLogin schonmal ausgeführt ? gecachte ausgabe erlaubt ?
if ($this->cache) {
if ($this->login_status > 0) {
return true;
} elseif ($this->login_status < 0) {
return false;
}
}
if ($this->usr_login != '') {
// wenn login daten eingegeben dann checken
// auf error seite verweisen und message schreiben
$this->USER = new rex_login_sql($this->DB);
$USR_LOGIN = $this->usr_login;
$USR_PSW = $this->usr_psw;
$query = str_replace('USR_LOGIN', $this->usr_login, $this->login_query);
$query = str_replace('USR_PSW', $this->usr_psw, $query);
$this->USER->setQuery($query);
if ($this->USER->getRows() == 1) {
$ok = true;
$this->setSessionVar('UID', $this->USER->getValue($this->uid));
$this->sessionFixation();
} else {
$this->message = $I18N->msg('login_error', $REX['RELOGINDELAY']);
$this->setSessionVar('UID', '');
}
} elseif ($this->getSessionVar('UID') != '') {
// wenn kein login und kein logout dann nach sessiontime checken
// message schreiben und falls falsch auf error verweisen
$this->USER = new rex_login_sql($this->DB);
$query = str_replace('USR_UID', $this->getSessionVar('UID'), $this->user_query);
$this->USER->setQuery($query);
if ($this->USER->getRows() == 1) {
if ($this->getSessionVar('STAMP') + $this->session_duration > time()) {
$ok = true;
$this->setSessionVar('UID', $this->USER->getValue($this->uid));
} else {
$this->message = $I18N->msg('login_session_expired');
}
} else {
$this->message = $I18N->msg('login_user_not_found');
}
} else {
$this->message = $I18N->msg('login_welcome');
$ok = false;
}
} else {
$this->message = $I18N->msg('login_logged_out');
$this->setSessionVar('UID', '');
}
if ($ok) {
// wenn alles ok dann REX[UID][system_id) schreiben
$this->setSessionVar('STAMP', time());
} else {
// wenn nicht, dann UID loeschen und error seite
$this->setSessionVar('STAMP', '');
$this->setSessionVar('UID', '');
}
if ($ok) {
$this->login_status = 1;
} else {
$this->login_status = -1;
}
return $ok;
}
示例7: rex_translate
/**
* Übersetzt den text $text, falls dieser mit dem prefix "translate:" beginnt.
*/
function rex_translate($text, $I18N_Catalogue = null, $use_htmlspecialchars = true)
{
if (!$I18N_Catalogue) {
global $REX, $I18N;
if (!$I18N) {
$I18N = rex_create_lang($REX['LANG']);
}
return rex_translate($text, $I18N, $use_htmlspecialchars);
}
$tranKey = 'translate:';
$transKeyLen = strlen($tranKey);
if (substr($text, 0, $transKeyLen) == $tranKey) {
$text = $I18N_Catalogue->msg(substr($text, $transKeyLen));
}
if ($use_htmlspecialchars) {
return htmlspecialchars($text);
}
return $text;
}
示例8: rex_request
$MSG['err'] = "";
$checkmodus = rex_request('checkmodus', 'float');
$send = rex_request('send', 'string');
$dbanlegen = rex_request('dbanlegen', 'string');
$noadmin = rex_request('noadmin', 'string');
$lang = rex_request('lang', 'string');
$export_addon_dir = $REX['INCLUDE_PATH'] . '/addons/import_export';
require_once $export_addon_dir . '/functions/function_folder.inc.php';
require_once $export_addon_dir . '/functions/function_import_folder.inc.php';
require_once $export_addon_dir . '/functions/function_import_export.inc.php';
// ---------------------------------- MODUS 0 | Start
if (!($checkmodus > 0 && $checkmodus < 10)) {
$langpath = $REX['INCLUDE_PATH'] . '/lang';
foreach ($REX['LANGUAGES'] as $l) {
$isUtf8 = substr($l, -4) == 'utf8';
$I18N_T = rex_create_lang($l, $langpath, FALSE);
$label = $I18N_T->msg('lang');
if ($isUtf8) {
$label .= ' (utf-8)';
}
$langs[$l] = '<li><a href="index.php?checkmodus=0.5&lang=' . $l . '"' . rex_tabindex() . '>' . $label . '</a></li>';
}
unset($I18N_T);
// wenn nur eine Sprache -> direkte weiterleitung
if (count($REX['LANGUAGES']) == 1) {
header('Location: index.php?checkmodus=0.5&lang=' . key($langs));
exit;
}
rex_setup_title('SETUP: SELECT LANGUAGE');
echo '<h2 class="rex-hl2">Please choose a language!</h2>
<div class="rex-area-content">
示例9: rex_send_content
/**
* Sendet den Content zum Client,
* fügt ggf. HTTP1.1 cache headers hinzu
*
* @param $content string Inhalt des Artikels
* @param $lastModified integer Last-Modified Timestamp
* @param $cacheKey string Cachekey zur identifizierung des Caches
* @param $environment string Die Umgebung aus der der Inhalt gesendet wird
* (frontend/backend)
* @param $sendcharset boolean TRUE, wenn der Charset mitgeschickt werden soll, sonst FALSE
*/
function rex_send_content($content, $lastModified, $etag, $environment, $sendcharset = false)
{
global $REX;
if ($sendcharset) {
global $I18N;
// Im Frontend gibts kein I18N
if (!is_object($I18N)) {
$I18N = rex_create_lang($REX['LANG']);
}
header('Content-Type: text/html; charset=' . $I18N->msg('htmlcharset'));
}
// ----- Last-Modified
if ($REX['USE_LAST_MODIFIED'] === 'true' || $REX['USE_LAST_MODIFIED'] == $environment) {
rex_send_last_modified($lastModified);
}
// ----- ETAG
if ($REX['USE_ETAG'] === 'true' || $REX['USE_ETAG'] == $environment) {
rex_send_etag($etag);
}
// ----- GZIP
if ($REX['USE_GZIP'] === 'true' || $REX['USE_GZIP'] == $environment) {
$content = rex_send_gzip($content);
}
// ----- MD5 Checksum
// dynamische teile sollen die md5 summe nicht beeinflussen
if ($REX['USE_MD5'] === 'true' || $REX['USE_MD5'] == $environment) {
rex_send_checksum(md5(preg_replace('@<!--DYN-->.*<!--/DYN-->@', '', $content)));
}
// Evtl offene Db Verbindungen schließen
rex_sql::disconnect(null);
// content length schicken, damit der browser einen ladebalken anzeigen kann
if (!ini_get('zlib.output_compression')) {
header('Content-Length: ' . strlen($content));
}
echo $content;
}
示例10: rex_translate
/**
* Übersetzt den text $text, falls dieser mit dem prefix "translate:" beginnt.
*/
function rex_translate($text, $I18N_Catalogue = null, $use_htmlspecialchars = true)
{
if (!$I18N_Catalogue) {
global $REX, $I18N;
if (!$I18N) {
$I18N = rex_create_lang($REX['LANG']);
}
if (!$I18N) {
trigger_error('Unable to create language "' . $REX['LANG'] . '"', E_USER_ERROR);
}
return rex_translate($text, $I18N, $use_htmlspecialchars);
}
$tranKey = 'translate:';
$transKeyLen = strlen($tranKey);
if (substr($text, 0, $transKeyLen) == $tranKey) {
$text = $I18N_Catalogue->msg(substr($text, $transKeyLen));
}
if ($use_htmlspecialchars) {
return htmlspecialchars($text);
}
return $text;
}
示例11: rex_send_content
/**
* Sendet den Content zum Client,
* fügt ggf. HTTP1.1 cache headers hinzu
*
* @param $content string Inhalt des Artikels
* @param $lastModified integer Last-Modified Timestamp
* @param $cacheKey string Cachekey zur identifizierung des Caches
* @param $environment string Die Umgebung aus der der Inhalt gesendet wird
* (frontend/backend)
* @param $sendcharset boolean TRUE, wenn der Charset mitgeschickt werden soll, sonst FALSE
*/
function rex_send_content($content, $lastModified, $etag, $environment, $sendcharset = FALSE)
{
global $REX;
// Cachen erlauben, nach revalidierung
// see http://xhtmlforum.de/35221-php-session-etag-header.html#post257967
session_cache_limiter('none');
header('Cache-Control: must-revalidate, proxy-revalidate, private');
if ($sendcharset) {
global $I18N;
// Im Frontend gibts kein I18N
if (!is_object($I18N)) {
$I18N = rex_create_lang($REX['LANG']);
}
header('Content-Type: text/html; charset=' . $I18N->msg('htmlcharset'));
}
// ----- Last-Modified
if ($REX['USE_LAST_MODIFIED'] === 'true' || $REX['USE_LAST_MODIFIED'] == $environment) {
rex_send_last_modified($lastModified);
}
// ----- ETAG
if ($REX['USE_ETAG'] === 'true' || $REX['USE_ETAG'] == $environment) {
rex_send_etag($etag);
}
// ----- GZIP
if ($REX['USE_GZIP'] === 'true' || $REX['USE_GZIP'] == $environment) {
$content = rex_send_gzip($content);
}
// ----- MD5 Checksum
// dynamische teile sollen die md5 summe nicht beeinflussen
if ($REX['USE_MD5'] === 'true' || $REX['USE_MD5'] == $environment) {
rex_send_checksum(md5(preg_replace('@<!--DYN-->.*<!--/DYN-->@', '', $content)));
}
// Evtl offene Db Verbindungen schließen
rex_sql::disconnect(null);
// content length schicken, damit der browser einen ladebalken anzeigen kann
header('Content-Length: ' . strlen($content));
echo $content;
}
示例12: rex_a1_export_db
/**
* Erstellt einen SQL Dump, der die aktuellen Datebankstruktur darstellt.
* Dieser wird in der Datei $filename gespeichert.
*
* @return boolean TRUE wenn ein Dump erstellt wurde, sonst FALSE
*/
function rex_a1_export_db($filename, array $tables = null)
{
global $REX, $I18N;
$fp = @fopen($filename, 'w');
if (!$fp) {
return false;
}
// Im Frontend gibts kein I18N
if (!is_object($I18N)) {
$I18N = rex_create_lang($REX['LANG']);
}
$sql = rex_sql::factory();
$nl = "\n";
$insertSize = 5000;
// ----- EXTENSION POINT
rex_register_extension_point('A1_BEFORE_DB_EXPORT');
// Versionsstempel hinzufügen
fwrite($fp, '## Redaxo Database Dump Version ' . $REX['VERSION'] . $nl);
fwrite($fp, '## Prefix ' . $REX['TABLE_PREFIX'] . $nl);
fwrite($fp, '## charset ' . $I18N->msg('htmlcharset') . $nl . $nl);
// fwrite($fp, '/*!40110 START TRANSACTION; */'.$nl);
if (is_null($tables)) {
$tables = array();
foreach (rex_sql::showTables(1, $REX['TABLE_PREFIX']) as $table) {
if ($table != $REX['TABLE_PREFIX'] . 'user' && substr($table, 0, strlen($REX['TABLE_PREFIX'] . $REX['TEMP_PREFIX'])) != $REX['TABLE_PREFIX'] . $REX['TEMP_PREFIX']) {
// Tabellen die mit rex_tmp_ beginnne, werden nicht exportiert!
$tables[] = $table;
}
}
}
foreach ($tables as $table) {
//---- export metadata
$create = rex_sql::showCreateTable($table);
fwrite($fp, "DROP TABLE IF EXISTS `{$table}`;\n");
fwrite($fp, "{$create};\n");
$fields = $sql->getArray("SHOW FIELDS FROM `{$table}`");
foreach ($fields as $idx => $field) {
if (preg_match('#^(bigint|int|smallint|mediumint|tinyint|timestamp)#i', $field['Type'])) {
$fields[$idx] = 'int';
} elseif (preg_match('#^(float|double|decimal)#', $field['Type'])) {
$fields[$idx] = 'double';
} elseif (preg_match('#^(char|varchar|text|longtext|mediumtext|tinytext)#', $field['Type'])) {
$fields[$idx] = 'string';
}
// else ?
}
//---- export tabledata
$start = 0;
$max = $insertSize;
do {
$sql->freeResult();
$sql->setQuery("SELECT * FROM `{$table}` LIMIT {$start},{$max}");
if ($sql->getRows() > 0 && $start == 0) {
fwrite($fp, "\nLOCK TABLES `{$table}` WRITE;");
fwrite($fp, "\n/*!40000 ALTER TABLE `{$table}` DISABLE KEYS */;");
} elseif ($sql->getRows() == 0) {
break;
}
$start += $max;
$values = array();
while ($sql->hasNext()) {
$record = array();
foreach ($fields as $idx => $type) {
$column = $sql->getValue($idx);
switch ($type) {
case 'int':
$record[] = intval($column);
break;
case 'double':
$record[] = sprintf('%.10F', (double) $column);
break;
case 'string':
default:
$record[] = $sql->escape($column, "'", true);
break;
}
}
$values[] = $nl . ' (' . implode(',', $record) . ')';
$sql->next();
}
if (!empty($values)) {
$values = implode(',', $values);
fwrite($fp, "\nINSERT INTO `{$table}` VALUES {$values};");
unset($values);
}
} while ($sql->getRows() >= $max);
if ($start > 0) {
fwrite($fp, "\n/*!40000 ALTER TABLE `{$table}` ENABLE KEYS */;");
fwrite($fp, "\nUNLOCK TABLES;\n\n");
}
}
fclose($fp);
$hasContent = true;
// Den Dateiinhalt geben wir nur dann weiter, wenn es unbedingt notwendig ist.
//.........这里部分代码省略.........
示例13: syncData
public static function syncData()
{
global $REX, $I18N;
// error reporting
if (HR4YOU_SYNC_DEBUG_MODE) {
ini_set('display_startup_errors', 1);
ini_set('display_errors', 1);
error_reporting(-1);
} else {
ini_set('display_startup_errors', 0);
ini_set('display_errors', 0);
error_reporting(0);
}
// necessary stuff so mediapool function can work properly in frontend
$REX['USER'] = new rex_fe_user();
$I18N = rex_create_lang($REX['LANG']);
include_once $REX['INCLUDE_PATH'] . '/functions/function_rex_generate.inc.php';
include_once $REX['INCLUDE_PATH'] . '/functions/function_rex_mediapool.inc.php';
// init logger
$logFile = HR4YOU_SYNC_LOG_FILE_PATH;
$log = KLogger::instance($logFile, KLogger::INFO);
$phpLogErrors = ini_get('log_errors');
$phperrorLog = ini_get('error_log');
ini_set('log_errors', 1);
ini_set('error_log', $log->getLogFilePath());
$log->logInfo('======================================== START HR4YOU SYNC ========================================');
$context = stream_context_create(array('http' => array('header' => 'Accept: application/xml')));
$xmlUrl = $REX['ADDON']['hr4you_sync']['settings']['xml_url'];
$defaultClangId = $REX['ADDON']['hr4you_sync']['settings']['default_clang_id'];
$defaultArticleId = $REX['ADDON']['hr4you_sync']['settings']['default_article_id'];
$defaultMediaCategoryId = $REX['ADDON']['hr4you_sync']['settings']['default_media_category_id'];
$defaultJobCategoryId = $REX['ADDON']['hr4you_sync']['settings']['default_job_category_id'];
$xmlString = file_get_contents($xmlUrl, false, $context);
$jobs = new SimpleXMLElement($xmlString);
// remove all previously synced jobs and media files
$log->logInfo('>> [INF] remove all previously synced jobs and media files');
$sql = rex_sql::factory();
$sql->setDebug(HR4YOU_SYNC_DEBUG_MODE);
rex_hr4you_sync_utils::logQuery($log, $sql, "SELECT * FROM `" . $REX['TABLE_PREFIX'] . "d2u_stellenmarkt_stellen` WHERE hr4you_jobid > 0 ORDER BY stellen_id ASC");
for ($i = 0; $i < $sql->getRows(); $i++) {
$sql2 = rex_sql::factory();
$sql2->setDebug(HR4YOU_SYNC_DEBUG_MODE);
rex_hr4you_sync_utils::logQuery($log, $sql2, 'DELETE FROM `' . $REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_stellen` WHERE stellen_id = ' . $sql->getValue('stellen_id'));
rex_hr4you_sync_utils::logQuery($log, $sql2, 'DELETE FROM `' . $REX['TABLE_PREFIX'] . 'd2u_stellenmarkt_stellen_lang` WHERE stellen_id = ' . $sql->getValue('stellen_id'));
// delete media
$log->logInfo('>> [INF] delete media: ' . $sql->getValue('bild'));
$media = OOMedia::getMediaByFileName($sql->getValue('bild'));
if (is_object($media)) {
$mediaInUse = $media->isInUse();
if ($mediaInUse === false) {
if ($media->delete() !== false) {
// success
$log->logInfo('>> [INF] media deleted');
} else {
// failed
$log->logError('>> [ERR] media not deleted');
}
} else {
$log->logInfo('>> [INF] media not deleted because still in use');
}
} else {
$log->logInfo('>> [INF] media does not exist anymore');
}
$sql->next();
}
// add jobs
$log->logInfo('>> [INF] add jobs');
foreach ($jobs->entry as $job) {
$sql = rex_sql::factory();
$sql->setDebug(HR4YOU_SYNC_DEBUG_MODE);
rex_hr4you_sync_utils::logQuery($log, $sql, "SELECT * FROM `" . $REX['TABLE_PREFIX'] . "d2u_stellenmarkt_stellen` WHERE hr4you_jobid = " . $job->jobid);
if ($sql->getRows() < 1) {
// for safety reasons: only addon new job if it does not already exist
// copy media file
$log->logInfo('>> [INF] copy media file');
$pathInfo = pathinfo($job->kopfgrafik_url);
$originalFile = $pathInfo['basename'];
$originalFileWithPath = $REX['MEDIAFOLDER'] . DIRECTORY_SEPARATOR . $originalFile;
$mediaFile = self::rex_mediapool_filename_nosubindex($pathInfo['basename'], false);
$mediaFileWithPath = $REX['MEDIAFOLDER'] . DIRECTORY_SEPARATOR . $mediaFile;
if (!file_exists($mediaFileWithPath)) {
if (copy($job->kopfgrafik_url, $mediaFileWithPath)) {
$log->logInfo('>> [INF] media file sucessfully copied because it does not exist');
}
if (chmod($mediaFileWithPath, $REX['FILEPERM'])) {
$log->logInfo('>> [INF] media file chmod to: ' . $REX['FILEPERM']);
}
$mpSyncReturn = rex_mediapool_syncFile($mediaFile, $defaultMediaCategoryId, $job->kopfgrafik_name);
$log->logInfo('>> [INF] media file synced width return value: ', $mpSyncReturn);
} else {
$log->logInfo('>> [INF] media file already exists');
}
// retrieve id of contact by email address
$log->logInfo('>> [INF] retrieve id of contact by email address');
$sql2 = rex_sql::factory();
$sql2->setDebug(HR4YOU_SYNC_DEBUG_MODE);
rex_hr4you_sync_utils::logQuery($log, $sql2, "SELECT kontakt_id FROM `" . $REX['TABLE_PREFIX'] . "d2u_stellenmarkt_kontakt` WHERE email LIKE '" . $job->ap_email . "'");
if ($sql2->getRows() > 0) {
//contact found
$contactId = $sql2->getValue('kontakt_id');
//.........这里部分代码省略.........
示例14: offline404ModeMsg
public static function offline404ModeMsg($params)
{
global $REX, $I18N;
if (!is_object($I18N)) {
$I18N = rex_create_lang($REX['LANG']);
}
$I18N->appendFile($REX['INCLUDE_PATH'] . '/addons/seo42/lang/');
$insert = '
<!-- SEO42 Offline 404 Mode -->
<style type="text/css">
body {
position: relative;
}
#seo42-offline-404-frontend-msg {
font-family: Arial, sans-serif;
font-size: 13px;
color: white;
background: darkred;
border: 1px solid #fff;
position: fixed;
left: 0;
right: 0;
top: 0;
padding: 4px;
text-align: center;
z-index: 100;
}
</style>
<div id="seo42-offline-404-frontend-msg">' . $I18N->msg('seo42_offline_404_frontend_msg') . '</div>
<!-- SEO42 Offline 404 Mode -->' . PHP_EOL;
return str_replace('</body>', $insert . '</body>', $params['subject']);
}
示例15: rex_request
// --------------------------------------------- END: SETUP FUNCTIONS
$MSG['err'] = '';
$checkmodus = rex_request('checkmodus', 'float');
$send = rex_request('send', 'string');
$dbanlegen = rex_request('dbanlegen', 'string');
$noadmin = rex_request('noadmin', 'string');
$lang = rex_request('lang', 'string');
$export_addon_dir = $REX['INCLUDE_PATH'] . '/addons/import_export';
require_once $export_addon_dir . '/functions/function_folder.inc.php';
require_once $export_addon_dir . '/functions/function_import_folder.inc.php';
require_once $export_addon_dir . '/functions/function_import_export.inc.php';
// ---------------------------------- MODUS 0 | Start
if (!($checkmodus > 0 && $checkmodus < 10)) {
$langpath = $REX['INCLUDE_PATH'] . '/lang';
foreach ($REX['LANGUAGES'] as $l) {
$I18N_T = rex_create_lang($l, $langpath, false);
$label = $I18N_T->msg('lang');
$label .= ' (utf-8)';
$langs[$l] = '<li><a href="index.php?checkmodus=0.5&lang=' . $l . '"' . rex_tabindex() . '>' . $label . '</a></li>';
}
unset($I18N_T);
// wenn nur eine Sprache -> direkte weiterleitung
if (count($REX['LANGUAGES']) == 1) {
header('Location: index.php?checkmodus=0.5&lang=' . key($langs));
exit;
}
rex_setup_title('SETUP: SELECT LANGUAGE');
echo '<h2 class="rex-hl2">Please choose a language!</h2>
<div class="rex-area-content">
<ul class="rex-setup-language">' . implode('', $langs) . '</ul>
</div>';