CHANGE: rearrangement for ENTITY class and globalfunctions.php.
XMLエンティティを扱うクラスとしてENTITYクラスを再整備。i18n::hsc()とi18n::hen()を移動。
これにより、globalfunctionsの以下の関数が非推奨となる。
highlight
shorten
stringStripTags
toAscii
stringToAttribute
stringToXML
加えて、formatDate()をi18n::formatted_datetime()に移動した。内容はまだ整備してない。
Login Name (required):
<br />
- <input name="name" size="32" maxlength="32" <?php if(isset($_POST['name'])){echo 'value="'.i18n::hsc($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
+ <input name="name" size="32" maxlength="32" <?php if(isset($_POST['name'])){echo 'value="'.ENTITY::hsc($_POST['name']).'"';}?>/> <small>(only a-z, 0-9)</small>
<br />
<br />
Real Name (required):
<br />
- <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.i18n::hsc($_POST['realname']).'"';}?>/>
+ <input name="realname" size="40" <?php if(isset($_POST['realname'])){echo 'value="'.ENTITY::hsc($_POST['realname']).'"';}?>/>
<br />
<br />
Email (required):
<br />
- <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.i18n::hsc($_POST['email']).'"';}?>/> <small>(must be valid, because an activation link will be sent over there)</small>
+ <input name="email" size="40" <?php if(isset($_POST['email'])){echo 'value="'.ENTITY::hsc($_POST['email']).'"';}?>/> <small>(must be valid, because an activation link will be sent over there)</small>
<br />
<br />
URL:
<br />
- <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.i18n::hsc($_POST['url']).'"';}?>/>
+ <input name="url" size="60" <?php if(isset($_POST['url'])){echo 'value="'.ENTITY::hsc($_POST['url']).'"';}?>/>
<br />
<?php
// add extra fields from plugin, like NP_Profile
<table>
<tr>
<td><label for="if_mySQL_host"><?php echo _TEXT4_TAB_FIELD1; ?>:</label></td>
- <td><input id="if_mySQL_host" name="mySQL_host" value="<?php echo i18n::hsc(@ini_get('mysql.default_host') )?>" /></td>
+ <td><input id="if_mySQL_host" name="mySQL_host" value="<?php echo ENTITY::hsc(@ini_get('mysql.default_host') )?>" /></td>
</tr>
<tr>
<td><label for="if_mySQL_user"><?php echo _TEXT4_TAB_FIELD2; ?>:</label></td>
for ( $idx = 0; $idx < $count; $idx++ )
{
$query = trim($queries[$idx]);
- // echo "QUERY = <small>" . i18n::hsc($query) . "</small><p>";
+ // echo "QUERY = <small>" . ENTITY::hsc($query) . "</small><p>";
if ( $query )
{
$query = str_replace($aTableNames, $aTableNamesPrefixed, $query);
} // end if
- sql_query($query, $MYSQL_CONN) or _doError(_ERROR30 . ' (<small>' . i18n::hsc($query) . '</small>): ' . sql_error($MYSQL_CONN) );
+ sql_query($query, $MYSQL_CONN) or _doError(_ERROR30 . ' (<small>' . ENTITY::hsc($query) . '</small>): ' . sql_error($MYSQL_CONN) );
} // end if
} // end loop
// 5a make first post
$newpost = "INSERT INTO ". tableName('nucleus_item') ." VALUES (1, '" . _1ST_POST_TITLE . "', '" . _1ST_POST . "', '" . _1ST_POST2 . "', 1, 1, '2005-08-15 11:04:26', 0, 0, 0, 1, 0, 1);";
- sql_query($newpost,$MYSQL_CONN) or _doError(_ERROR18 . ' (<small>' . i18n::hsc($newpost) . '</small>): ' . sql_error($MYSQL_CONN) );
+ sql_query($newpost,$MYSQL_CONN) or _doError(_ERROR18 . ' (<small>' . ENTITY::hsc($newpost) . '</small>): ' . sql_error($MYSQL_CONN) );
// 6. update global settings
updateConfig('IndexURL', $config_indexurl);
<form method="post" action="bookmarklet.php">
<p>
<input name="action" value="login" type="hidden" />
- <input name="blogid" value="<?php echo i18n::hsc($blogid); ?>" type="hidden" />
- <input name="logtext" value="<?php echo i18n::hsc($log_text); ?>" type="hidden" />
- <input name="loglink" value="<?php echo i18n::hsc($log_link); ?>" type="hidden" />
- <input name="loglinktitle" value="<?php echo i18n::hsc($log_linktitle); ?>" type="hidden" />
+ <input name="blogid" value="<?php echo ENTITY::hsc($blogid); ?>" type="hidden" />
+ <input name="logtext" value="<?php echo ENTITY::hsc($log_text); ?>" type="hidden" />
+ <input name="loglink" value="<?php echo ENTITY::hsc($log_link); ?>" type="hidden" />
+ <input name="loglinktitle" value="<?php echo ENTITY::hsc($log_linktitle); ?>" type="hidden" />
<?php echo _LOGINFORM_NAME ?>:
<br /><input name="login" />
<br /><?php echo _LOGINFORM_PWD ?>:
$logje = '';
if ($log_text) {
- $logje .= '<blockquote><div>"' . i18n::hsc($log_text) . '"</div></blockquote>' . "\n";
+ $logje .= '<blockquote><div>"' . ENTITY::hsc($log_text) . '"</div></blockquote>' . "\n";
}
if (!$log_linktitle) {
}
if ($log_link) {
- $logje .= '<a href="' . i18n::hsc($log_link) . '">' . i18n::hsc($log_linktitle) . '</a>';
+ $logje .= '<a href="' . ENTITY::hsc($log_link) . '">' . ENTITY::hsc($log_linktitle) . '</a>';
}
$item['body'] = $logje;
- $item['title'] = i18n::hsc($log_linktitle);
+ $item['title'] = ENTITY::hsc($log_linktitle);
$factory = new PAGEFACTORY($blogid);
$factory->createAddForm('bookmarklet', $item);
<tr>
<td>
<b><?php echo $a_name?></b>
- <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+ <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
</td>
<td>
<?php $query = 'SELECT mname as text, mnumber as value FROM '.sql_table('member');
echo "<ul>";
echo "<li>Blogger ID: $bloggerid </li>";
- echo "<li>Body:" . i18n::hsc(substr($row['body'],0,20)) . "...(time: " . $timestamp . ") </li>";
+ echo "<li>Body:" . ENTITY::hsc(substr($row['body'],0,20)) . "...(time: " . $timestamp . ") </li>";
echo "<li>author: " . $row['author'] ;
echo " (nucleus-id: " . $nucl_id . ")</li>";
else
$c_userid = $c_email;
- echo '<div>',i18n::hsc(shorten($c_text,50,'...')),'</div><ul>';
+ echo '<div>',ENTITY::hsc(shorten($c_text,50,'...')),'</div><ul>';
// echo '<li>Date: ',strftime('%x %X',$c_timestamp),'</li>';
echo "<li>Name: $c_name</li>";
// echo "<li>Email: $c_email</li>";
case 'NucleusMemberOptions':
$res = sql_query('SELECT mname as text, mnumber as value FROM '.sql_table('member'));
while ($o = mysql_fetch_object($res)) {
- echo '<option value="'.i18n::hsc($o->value).'">'.i18n::hsc($o->text).'</option>';
+ echo '<option value="'.ENTITY::hsc($o->value).'">'.ENTITY::hsc($o->text).'</option>';
}
break;
// ----------------------------------------------------------------------------------------
<tr>
<td>
<strong><?php echo $a_name?></strong>
- <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+ <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
</td>
<td>
<select name="memberid[<?php echo $idx?>]">
<tr>
<td>
<strong><?php echo $a_name?></strong>
- <input name="category[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+ <input name="category[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
</td>
<td>
<select name="catid[<?php echo $idx?>]">
* Called by XML parser for data inside elements
*/
function characterData ($parser, $data) {
- if ($this->bDebug) echo 'NEW DATA: ', i18n::hsc($data), '<br />';
+ if ($this->bDebug) echo 'NEW DATA: ', ENTITY::hsc($data), '<br />';
$this->cdata .= $data;
}
</p>
<ul>
- <li>GreyMatter path: <input name="grey_scriptpath" size="60" value="<?php echo i18n::hsc($guess)?>" /></li>
+ <li>GreyMatter path: <input name="grey_scriptpath" size="60" value="<?php echo ENTITY::hsc($guess)?>" /></li>
</ul>
<p>
<tr>
<td>
<b><?php echo $a_name?></b>
- <input name="author[<?php echo $idx?>]" value="<?php echo i18n::hsc($a_name)?>" type="hidden"
+ <input name="author[<?php echo $idx?>]" value="<?php echo ENTITY::hsc($a_name)?>" type="hidden"
</td>
<td>
<?php // TODO: avoid doing this query multiple times
<h1>Do the conversion!</h1>
<p>
<input type="hidden" name="authorcount" value="<?php echo $idx?>" />
- <input type="hidden" name="grey_scriptpath" value="<?php echo i18n::hsc($grey_scriptpath)?>" />
- <input type="hidden" name="grey_datapath" value="<?php echo i18n::hsc($grey_datapath)?>" />
- <input type="hidden" name="grey_dataurl" value="<?php echo i18n::hsc($grey_dataurl)?>" />
+ <input type="hidden" name="grey_scriptpath" value="<?php echo ENTITY::hsc($grey_scriptpath)?>" />
+ <input type="hidden" name="grey_datapath" value="<?php echo ENTITY::hsc($grey_datapath)?>" />
+ <input type="hidden" name="grey_dataurl" value="<?php echo ENTITY::hsc($grey_dataurl)?>" />
<input type="submit" value="Do the conversion!" />
<input type="hidden" name="action" value="doConversion" />
</p>
// TODO: copy file to media directory
// TODO: create %popup(...)% code instead
- $text = i18n::hsc(stripslashes($text));
+ $text = ENTITY::hsc(stripslashes($text));
return "<%popup($filename|$width|$height|$text)%>";
}
$timestamp = date("Y-m-d H:i:s",bc_transformDate($row['eventtime']));
echo "<pre>";
- echo "<b>entry</b>:" . i18n::hsc(substr($row['event'],0,20)) . "...(time: " . $timestamp . ") \n";
+ echo "<b>entry</b>:" . ENTITY::hsc(substr($row['event'],0,20)) . "...(time: " . $timestamp . ") \n";
echo "<b>author</b>: " . $row['author'] ;
echo " (nucleus-id: " . $nucl_id . ")";
echo "</pre>";
*/
function _link($url, $linktext = '')
{
- $u = i18n::hsc($url);
+ $u = ENTITY::hsc($url);
$u = preg_replace("/&amp;/",'&',$u); // fix URLs that already had encoded ampersands
if ($linktext != '')
- $l = '<a href="' . $u .'">'.i18n::hsc($linktext).'</a>';
+ $l = '<a href="' . $u .'">'.ENTITY::hsc($linktext).'</a>';
else
$l = $u;
return $l;
function parse_additemform() {
global $blog, $CONF;
$this->formdata = array(
- 'adminurl' => i18n::hsc($CONF['AdminURL']),
+ 'adminurl' => ENTITY::hsc($CONF['AdminURL']),
'catid' => $blog->getDefaultCategory()
);
$blog->InsertJavaScriptInfo();
global $blog;
switch($which) {
case 'id':
- echo i18n::hsc($blog->getID());
+ echo ENTITY::hsc($blog->getID());
break;
case 'url':
- echo i18n::hsc($blog->getURL());
+ echo ENTITY::hsc($blog->getURL());
break;
case 'name':
- echo i18n::hsc($blog->getName());
+ echo ENTITY::hsc($blog->getName());
break;
case 'desc':
- echo i18n::hsc($blog->getDescription());
+ echo ENTITY::hsc($blog->getDescription());
break;
case 'short':
- echo i18n::hsc($blog->getShortName());
+ echo ENTITY::hsc($blog->getShortName());
break;
}
}
// note: createLink returns an HTML encoded URL
} else {
// HTML encode URL
- $destinationurl = i18n::hsc($destinationurl);
+ $destinationurl = ENTITY::hsc($destinationurl);
}
// values to prefill
$this->formdata = array(
'destinationurl' => $destinationurl, // url is already HTML encoded
- 'actionurl' => i18n::hsc($actionurl),
+ 'actionurl' => ENTITY::hsc($actionurl),
'itemid' => $itemid,
- 'user' => i18n::hsc($user),
- 'userid' => i18n::hsc($userid),
- 'email' => i18n::hsc($email),
- 'body' => i18n::hsc($body),
+ 'user' => ENTITY::hsc($user),
+ 'userid' => ENTITY::hsc($userid),
+ 'email' => ENTITY::hsc($email),
+ 'body' => ENTITY::hsc($body),
'membername' => $member->getDisplayName(),
'rememberchecked' => cookieVar($CONF['CookiePrefix'] .'comment_user')?'checked="checked"':''
);
function parse_errordiv() {
global $errormessage;
if ($errormessage)
- echo '<div class="error">', i18n::hsc($errormessage),'</div>';
+ echo '<div class="error">', ENTITY::hsc($errormessage),'</div>';
}
/**
function parse_image($what = 'imgtag') {
global $CONF;
- $imagetext = i18n::hsc(requestVar('imagetext'));
+ $imagetext = ENTITY::hsc(requestVar('imagetext'));
$imagepopup = requestVar('imagepopup');
$width = intRequestVar('width');
$height = intRequestVar('height');
- $fullurl = i18n::hsc($CONF['MediaURL'] . $imagepopup);
+ $fullurl = ENTITY::hsc($CONF['MediaURL'] . $imagepopup);
switch($what)
{
* Parse skinvar imagetext
*/
function parse_imagetext() {
- echo i18n::hsc(requestVar('imagetext'));
+ echo ENTITY::hsc(requestVar('imagetext'));
}
/**
echo $item['title'];
break;
default:
- echo i18n::hsc(strip_tags($item['title']));
+ echo ENTITY::hsc(strip_tags($item['title']));
break;
}
}
switch($what) {
case 'name':
- echo i18n::hsc($memberinfo->getDisplayName());
+ echo ENTITY::hsc($memberinfo->getDisplayName());
break;
case 'realname':
- echo i18n::hsc($memberinfo->getRealName());
+ echo ENTITY::hsc($memberinfo->getRealName());
break;
case 'notes':
- echo i18n::hsc($memberinfo->getNotes());
+ echo ENTITY::hsc($memberinfo->getNotes());
break;
case 'url':
- echo i18n::hsc($memberinfo->getURL());
+ echo ENTITY::hsc($memberinfo->getURL());
break;
case 'email':
- echo i18n::hsc($memberinfo->getEmail());
+ echo ENTITY::hsc($memberinfo->getEmail());
break;
case 'id':
- echo i18n::hsc($memberinfo->getID());
+ echo ENTITY::hsc($memberinfo->getID());
break;
}
}
$frommail = postVar('frommail');
$this->formdata = array(
- 'url' => i18n::hsc($desturl),
- 'actionurl' => i18n::hsc($CONF['ActionURL']),
+ 'url' => ENTITY::hsc($desturl),
+ 'actionurl' => ENTITY::hsc($CONF['ActionURL']),
'memberid' => $memberid,
'rows' => $rows,
'cols' => $cols,
- 'message' => i18n::hsc($message),
- 'frommail' => i18n::hsc($frommail)
+ 'message' => ENTITY::hsc($message),
+ 'frommail' => ENTITY::hsc($frommail)
);
if ($member->isLoggedIn()) {
$this->doForm('membermailform-loggedin');
echo $itemtitlenext;
break;
default:
- echo i18n::hsc($itemtitlenext);
+ echo ENTITY::hsc($itemtitlenext);
break;
}
}
echo $itemtitleprev;
break;
default:
- echo i18n::hsc($itemtitleprev);
+ echo ENTITY::hsc($itemtitleprev);
break;
}
}
*/
function parse_query() {
global $query;
- echo i18n::hsc($query);
+ echo ENTITY::hsc($query);
}
/**
* Parse skinvar referer
*/
function parse_referer() {
- echo i18n::hsc(serverVar('HTTP_REFERER'));
+ echo ENTITY::hsc(serverVar('HTTP_REFERER'));
}
/**
// use default blog when no blog is selected
$this->formdata = array(
'id' => $blog?$blog->getID():$CONF['DefaultBlog'],
- 'query' => i18n::hsc(getVar('query')),
+ 'query' => ENTITY::hsc(getVar('query')),
);
$this->doForm('searchform');
}
if (method_exists($this, $methodName))
call_user_func(array(&$this, $methodName));
else
- $this->error(_BADACTION . i18n::hsc(" ($action)"));
+ $this->error(_BADACTION . ENTITY::hsc(" ($action)"));
}
$this->pagehead();
echo '<h2>', _LOGIN ,'</h2>';
- if ($msg) echo _MESSAGE , ': ', i18n::hsc($msg);
+ if ($msg) echo _MESSAGE , ': ', ENTITY::hsc($msg);
?>
<form action="index.php" method="post"><p>
* @param object BLOG
*/
function bloglink(&$blog) {
- return '<a href="'.i18n::hsc($blog->getURL()).'" title="'._BLOGLIST_TT_VISIT.'">'. i18n::hsc( $blog->getName() ) .'</a>';
+ return '<a href="'.ENTITY::hsc($blog->getURL()).'" title="'._BLOGLIST_TT_VISIT.'">'. ENTITY::hsc( $blog->getName() ) .'</a>';
}
/**
echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
echo '<h2>',_BATCH_ITEMS,'</h2>';
- echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+ echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
echo '<ul>';
// walk over all itemids and perform action
foreach ($selected as $itemid) {
$itemid = intval($itemid);
- echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONITEM,' <b>', $itemid, '</b>...';
+ echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONITEM,' <b>', $itemid, '</b>...';
// perform action, display errors if needed
switch($action) {
$error = $this->moveOneItem($itemid, $destCatid);
break;
default:
- $error = _BATCH_UNKNOWN . i18n::hsc($action);
+ $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
}
echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
echo '<h2>',_BATCH_COMMENTS,'</h2>';
- echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+ echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
echo '<ul>';
// walk over all itemids and perform action
foreach ($selected as $commentid) {
$commentid = intval($commentid);
- echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONCOMMENT,' <b>', $commentid, '</b>...';
+ echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONCOMMENT,' <b>', $commentid, '</b>...';
// perform action, display errors if needed
switch($action) {
$error = $this->deleteOneComment($commentid);
break;
default:
- $error = _BATCH_UNKNOWN . i18n::hsc($action);
+ $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
}
echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
echo '<a href="index.php?action=usermanagement">(',_MEMBERS_BACKTOOVERVIEW,')</a>';
echo '<h2>',_BATCH_MEMBERS,'</h2>';
- echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+ echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
echo '<ul>';
// walk over all itemids and perform action
foreach ($selected as $memberid) {
$memberid = intval($memberid);
- echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONMEMBER,' <b>', $memberid, '</b>...';
+ echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONMEMBER,' <b>', $memberid, '</b>...';
// perform action, display errors if needed
switch($action) {
sql_query('UPDATE ' . sql_table('member') .' SET madmin=0 WHERE mnumber='.$memberid);
break;
default:
- $error = _BATCH_UNKNOWN . i18n::hsc($action);
+ $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
}
echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
echo '<p><a href="index.php?action=manageteam&blogid=',$blogid,'">(',_BACK,')</a></p>';
echo '<h2>',_BATCH_TEAM,'</h2>';
- echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+ echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
echo '<ul>';
// walk over all itemids and perform action
foreach ($selected as $memberid) {
$memberid = intval($memberid);
- echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONTEAM,' <b>', $memberid, '</b>...';
+ echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONTEAM,' <b>', $memberid, '</b>...';
// perform action, display errors if needed
switch($action) {
sql_query('UPDATE '.sql_table('team').' SET tadmin=0 WHERE tblog='.$blogid.' and tmember='.$memberid);
break;
default:
- $error = _BATCH_UNKNOWN . i18n::hsc($action);
+ $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
}
echo '<b>',($error ? $error : _BATCH_SUCCESS),'</b>';
echo '<a href="index.php?action=overview">(',_BACKHOME,')</a>';
echo '<h2>',BATCH_CATEGORIES,'</h2>';
- echo '<p>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b></p>';
+ echo '<p>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b></p>';
echo '<ul>';
// walk over all itemids and perform action
foreach ($selected as $catid) {
$catid = intval($catid);
- echo '<li>',_BATCH_EXECUTING,' <b>',i18n::hsc($action),'</b> ',_BATCH_ONCATEGORY,' <b>', $catid, '</b>...';
+ echo '<li>',_BATCH_EXECUTING,' <b>',ENTITY::hsc($action),'</b> ',_BATCH_ONCATEGORY,' <b>', $catid, '</b>...';
// perform action, display errors if needed
switch($action) {
$error = $this->moveOneCategory($catid, $destBlogId);
break;
default:
- $error = _BATCH_UNKNOWN . i18n::hsc($action);
+ $error = _BATCH_UNKNOWN . ENTITY::hsc($action);
}
echo '<b>',($error ? _ERROR . ': '.$error : _BATCH_SUCCESS),'</b>';
while ($oBlog = sql_fetch_object($blogs)) {
if ($multipleBlogs)
- echo '<optgroup label="',i18n::hsc($oBlog->bname),'">';
+ echo '<optgroup label="',ENTITY::hsc($oBlog->bname),'">';
// show selection to create new category when allowed/wanted
if ($showNewCat) {
$selectText = ' selected="selected" ';
else
$selectText = '';
- echo '<option value="',$oCat->catid,'" ', $selectText,'>',i18n::hsc($oCat->cname),'</option>';
+ echo '<option value="',$oCat->catid,'" ', $selectText,'>',ENTITY::hsc($oCat->cname),'</option>';
}
if ($multipleBlogs)
echo '<option value="',$oBlog->bnumber,'"';
if ($oBlog->bnumber == $selected)
echo ' selected="selected"';
- echo'>',i18n::hsc($oBlog->bname),'</option>';
+ echo'>',ENTITY::hsc($oBlog->bname),'</option>';
}
}
echo '</select>';
$this->error(_ERROR_NOSUCHITEM);
$item =& $manager->getItem($itemid,1,1);
- $title = i18n::hsc(strip_tags($item['title']));
+ $title = ENTITY::hsc(strip_tags($item['title']));
$body = strip_tags($item['body']);
- $body = i18n::hsc(shorten($body,300,'...'));
+ $body = ENTITY::hsc(shorten($body,300,'...'));
$this->pagehead();
?>
$comment = COMMENT::getComment($commentid);
$body = strip_tags($comment['body']);
- $body = i18n::hsc(shorten($body, 300, '...'));
+ $body = ENTITY::hsc(shorten($body, 300, '...'));
if ($comment['member'])
$author = $comment['member'];
</td>
<td>
<?php if ($CONF['AllowLoginEdit'] || $member->isAdmin()) { ?>
- <input name="name" tabindex="10" maxlength="32" size="32" value="<?php echo i18n::hsc($mem->getDisplayName()); ?>" />
+ <input name="name" tabindex="10" maxlength="32" size="32" value="<?php echo ENTITY::hsc($mem->getDisplayName()); ?>" />
<?php } else {
- echo i18n::hsc($member->getDisplayName());
+ echo ENTITY::hsc($member->getDisplayName());
}
?>
</td>
</tr><tr>
<td><?php echo _MEMBERS_REALNAME?></td>
- <td><input name="realname" tabindex="20" maxlength="60" size="40" value="<?php echo i18n::hsc($mem->getRealName()); ?>" /></td>
+ <td><input name="realname" tabindex="20" maxlength="60" size="40" value="<?php echo ENTITY::hsc($mem->getRealName()); ?>" /></td>
</tr><tr>
<?php if ($CONF['AllowLoginEdit'] || $member->isAdmin()) { ?>
<td><?php echo _MEMBERS_PWD?></td>
<td><?php echo _MEMBERS_EMAIL?>
<br /><small><?php echo _MEMBERS_EMAIL_EDIT?></small>
</td>
- <td><input name="email" tabindex="40" size="40" maxlength="60" value="<?php echo i18n::hsc($mem->getEmail()); ?>" /></td>
+ <td><input name="email" tabindex="40" size="40" maxlength="60" value="<?php echo ENTITY::hsc($mem->getEmail()); ?>" /></td>
</tr><tr>
<td><?php echo _MEMBERS_URL?></td>
- <td><input name="url" tabindex="50" size="40" maxlength="100" value="<?php echo i18n::hsc($mem->getURL()); ?>" /></td>
+ <td><input name="url" tabindex="50" size="40" maxlength="100" value="<?php echo ENTITY::hsc($mem->getURL()); ?>" /></td>
<?php // only allow to change this by super-admins
// we don't want normal users to 'upgrade' themselves to super-admins, do we? ;-)
if ($member->isAdmin()) {
<?php } ?>
</tr><tr>
<td><?php echo _MEMBERS_NOTES?></td>
- <td><input name="notes" tabindex="80" size="40" maxlength="100" value="<?php echo i18n::hsc($mem->getNotes()); ?>" /></td>
+ <td><input name="notes" tabindex="80" size="40" maxlength="100" value="<?php echo ENTITY::hsc($mem->getNotes()); ?>" /></td>
</tr><tr>
<td><?php echo _MEMBERS_DEFLANG?> <?php help('language'); ?>
</td>
$locales = i18n::get_available_locale_list();
if ( !$mem->getLocale() || !in_array($mem->getLocale(), $locales) )
{
- echo "<option value=\"\" selected=\"selected\">" . i18n::hsc(_MEMBERS_USESITELANG) . "</option>\n";
+ echo "<option value=\"\" selected=\"selected\">" . ENTITY::hsc(_MEMBERS_USESITELANG) . "</option>\n";
}
else
{
- echo "<option value=\"\">" . i18n::hsc(_MEMBERS_USESITELANG) . "</option>\n";
+ echo "<option value=\"\">" . ENTITY::hsc(_MEMBERS_USESITELANG) . "</option>\n";
}
foreach( $locales as $locale )
}
$aVars = array(
- 'memberName' => i18n::hsc($mem->getDisplayName())
+ 'memberName' => ENTITY::hsc($mem->getDisplayName())
);
$title = TEMPLATE::fill($title, $aVars);
$text = TEMPLATE::fill($text, $aVars);
<input type="hidden" name="action" value="activatesetpwd" />
<?php $manager->addTicketHidden() ?>
- <input type="hidden" name="key" value="<?php echo i18n::hsc($key) ?>" />
+ <input type="hidden" name="key" value="<?php echo ENTITY::hsc($key) ?>" />
<table><tr>
<td><?php echo _MEMBERS_PWD?></td>
?>
<h2><?php echo _DELETE_CONFIRM?></h2>
- <p><?php echo _CONFIRMTXT_TEAM1?><b><?php echo i18n::hsc($teammem->getDisplayName()) ?></b><?php echo _CONFIRMTXT_TEAM2?><b><?php echo i18n::hsc(strip_tags($blog->getName())) ?></b>
+ <p><?php echo _CONFIRMTXT_TEAM1?><b><?php echo ENTITY::hsc($teammem->getDisplayName()) ?></b><?php echo _CONFIRMTXT_TEAM2?><b><?php echo ENTITY::hsc(strip_tags($blog->getName())) ?></b>
</p>
$res = sql_query('SELECT mname, mrealname FROM ' . sql_table('member') . ',' . sql_table('team') . ' WHERE mnumber=tmember AND tblog=' . intval($blogid));
$aMemberNames = array();
while ($o = sql_fetch_object($res))
- array_push($aMemberNames, i18n::hsc($o->mname) . ' (' . i18n::hsc($o->mrealname). ')');
+ array_push($aMemberNames, ENTITY::hsc($o->mname) . ' (' . ENTITY::hsc($o->mrealname). ')');
echo implode(',', $aMemberNames);
?>
</p>
<input type="hidden" name="blogid" value="<?php echo $blogid; ?>" />
<table><tr>
<td><?php echo _EBLOG_NAME?></td>
- <td><input name="name" tabindex="10" size="40" maxlength="60" value="<?php echo i18n::hsc($blog->getName()) ?>" /></td>
+ <td><input name="name" tabindex="10" size="40" maxlength="60" value="<?php echo ENTITY::hsc($blog->getName()) ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_SHORTNAME?> <?php help('shortblogname'); ?>
<?php echo _EBLOG_SHORTNAME_EXTRA?>
</td>
- <td><input name="shortname" tabindex="20" maxlength="15" size="15" value="<?php echo i18n::hsc($blog->getShortName()) ?>" /></td>
+ <td><input name="shortname" tabindex="20" maxlength="15" size="15" value="<?php echo ENTITY::hsc($blog->getShortName()) ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_DESC?></td>
- <td><input name="desc" tabindex="30" maxlength="200" size="40" value="<?php echo i18n::hsc($blog->getDescription()) ?>" /></td>
+ <td><input name="desc" tabindex="30" maxlength="200" size="40" value="<?php echo ENTITY::hsc($blog->getDescription()) ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_URL?></td>
- <td><input name="url" tabindex="40" size="40" maxlength="100" value="<?php echo i18n::hsc($blog->getURL()) ?>" /></td>
+ <td><input name="url" tabindex="40" size="40" maxlength="100" value="<?php echo ENTITY::hsc($blog->getURL()) ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_DEFSKIN?>
<?php help('blogdefaultskin'); ?>
<td><?php $this->input_yesno('reqemail',$blog->emailRequired(),72); ?></td>
</tr><tr>
<td><?php echo _EBLOG_NOTIFY?> <?php help('blognotify'); ?></td>
- <td><input name="notify" tabindex="80" maxlength="128" size="40" value="<?php echo i18n::hsc($blog->getNotifyAddress()); ?>" /></td>
+ <td><input name="notify" tabindex="80" maxlength="128" size="40" value="<?php echo ENTITY::hsc($blog->getNotifyAddress()); ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_NOTIFY_ON?></td>
<td>
</td>
</tr><tr>
<td><?php echo _EBLOG_MAXCOMMENTS?> <?php help('blogmaxcomments'); ?></td>
- <td><input name="maxcomments" tabindex="90" size="3" value="<?php echo i18n::hsc($blog->getMaxComments()); ?>" /></td>
+ <td><input name="maxcomments" tabindex="90" size="3" value="<?php echo ENTITY::hsc($blog->getMaxComments()); ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_UPDATE?> <?php help('blogupdatefile'); ?></td>
- <td><input name="update" tabindex="100" size="40" maxlength="60" value="<?php echo i18n::hsc($blog->getUpdateFile()) ?>" /></td>
+ <td><input name="update" tabindex="100" size="40" maxlength="60" value="<?php echo ENTITY::hsc($blog->getUpdateFile()) ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_DEFCAT?></td>
<td>
<br /><?php echo _EBLOG_STIME?> <b><?php echo i18n::strftime("%H:%M",time()); ?></b>
<br /><?php echo _EBLOG_BTIME?> <b><?php echo i18n::strftime("%H:%M",$blog->getCorrectTime()); ?></b>
</td>
- <td><input name="timeoffset" tabindex="120" size="3" value="<?php echo i18n::hsc($blog->getTimeOffset()); ?>" /></td>
+ <td><input name="timeoffset" tabindex="120" size="3" value="<?php echo ENTITY::hsc($blog->getTimeOffset()); ?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_SEARCH?> <?php help('blogsearchable'); ?></td>
<td><?php $this->input_yesno('searchable',$blog->getSearchable(),122); ?></td>
echo "<p><a href='index.php?action=blogsettings&blogid=$blogid'>(",_BACK_TO_BLOGSETTINGS,")</a></p>";
?>
- <h2><?php echo _EBLOG_CAT_UPDATE?> '<?php echo i18n::hsc($cname)?>'</h2>
+ <h2><?php echo _EBLOG_CAT_UPDATE?> '<?php echo ENTITY::hsc($cname)?>'</h2>
<form method='post' action='index.php'><div>
<input name="blogid" type="hidden" value="<?php echo $blogid?>" />
<input name="catid" type="hidden" value="<?php echo $catid?>" />
- <input name="desturl" type="hidden" value="<?php echo i18n::hsc($desturl) ?>" />
+ <input name="desturl" type="hidden" value="<?php echo ENTITY::hsc($desturl) ?>" />
<input name="action" type="hidden" value="categoryupdate" />
<?php $manager->addTicketHidden(); ?>
<th colspan="2"><?php echo _EBLOG_CAT_UPDATE ?></th>
</tr><tr>
<td><?php echo _EBLOG_CAT_NAME?></td>
- <td><input type="text" name="cname" value="<?php echo i18n::hsc($cname)?>" size="40" maxlength="40" /></td>
+ <td><input type="text" name="cname" value="<?php echo ENTITY::hsc($cname)?>" size="40" maxlength="40" /></td>
</tr><tr>
<td><?php echo _EBLOG_CAT_DESC?></td>
- <td><input type="text" name="cdesc" value="<?php echo i18n::hsc($cdesc)?>" size="40" maxlength="200" /></td>
+ <td><input type="text" name="cdesc" value="<?php echo ENTITY::hsc($cdesc)?>" size="40" maxlength="200" /></td>
</tr>
<?php
// insert plugin options
<h2><?php echo _DELETE_CONFIRM?></h2>
<div>
- <?php echo _CONFIRMTXT_CATEGORY?><b><?php echo i18n::hsc($blog->getCategoryName($catid))?></b>
+ <?php echo _CONFIRMTXT_CATEGORY?><b><?php echo ENTITY::hsc($blog->getCategoryName($catid))?></b>
</div>
<form method="post" action="index.php"><div>
</p>
<div>
- <?php echo _CONFIRMTXT_BLOG?><b><?php echo i18n::hsc($blog->getName())?></b>
+ <?php echo _CONFIRMTXT_BLOG?><b><?php echo ENTITY::hsc($blog->getName())?></b>
</div>
<form method="post" action="index.php"><div>
?>
<h2><?php echo _DELETE_CONFIRM?></h2>
- <p><?php echo _CONFIRMTXT_MEMBER?><b><?php echo i18n::hsc($mem->getDisplayName()) ?></b>
+ <p><?php echo _CONFIRMTXT_MEMBER?><b><?php echo ENTITY::hsc($mem->getDisplayName()) ?></b>
</p>
<p>
?>
<h2><?php echo _BLOGCREATED_TITLE ?></h2>
- <p><?php echo sprintf(_BLOGCREATED_ADDEDTXT, i18n::hsc($bname)) ?></p>
+ <p><?php echo sprintf(_BLOGCREATED_ADDEDTXT, ENTITY::hsc($bname)) ?></p>
<ol>
- <li><a href="#index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEWAY, i18n::hsc($bshortname)) ?></a></li>
+ <li><a href="#index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEWAY, ENTITY::hsc($bshortname)) ?></a></li>
<li><a href="#skins"><?php echo _BLOGCREATED_ADVANCEDWAY ?></a></li>
</ol>
- <h3><a id="index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEDESC1, i18n::hsc($bshortname)) ?></a></h3>
+ <h3><a id="index_php"><?php echo sprintf(_BLOGCREATED_SIMPLEDESC1, ENTITY::hsc($bshortname)) ?></a></h3>
- <p><?php echo sprintf(_BLOGCREATED_SIMPLEDESC2, i18n::hsc($bshortname)) ?></p>
+ <p><?php echo sprintf(_BLOGCREATED_SIMPLEDESC2, ENTITY::hsc($bshortname)) ?></p>
<pre><code><?php
-$CONF['Self'] = '<b><?php echo i18n::hsc($bshortname)?>.php</b>';
+$CONF['Self'] = '<b><?php echo ENTITY::hsc($bshortname)?>.php</b>';
include('<i>./config.php</i>');
-selectBlog('<b><?php echo i18n::hsc($bshortname)?></b>');
+selectBlog('<b><?php echo ENTITY::hsc($bshortname)?></b>');
selector();
?></code></pre>
<input type="hidden" name="blogid" value="<?php echo intval($blogid)?>" />
<table><tr>
<td><?php echo _EBLOG_URL?></td>
- <td><input name="url" maxlength="100" size="40" value="<?php echo i18n::hsc($CONF['IndexURL'].$bshortname.'.php')?>" /></td>
+ <td><input name="url" maxlength="100" size="40" value="<?php echo ENTITY::hsc($CONF['IndexURL'].$bshortname.'.php')?>" /></td>
</tr><tr>
<td><?php echo _EBLOG_CREATE?></td>
<td><input type="submit" value="<?php echo _EBLOG_CREATE_BTN?>" onclick="return checkSubmit();" /></td>
<input type="hidden" name="mode" value="file" />
<select name="skinfile" id="skinie_import_local">
<?php foreach ($candidates as $skinname => $skinfile) {
- $html = i18n::hsc($skinfile);
+ $html = ENTITY::hsc($skinfile);
echo '<option value="',$html,'">',$skinname,'</option>';
}
?>
while ($skinObj = sql_fetch_object($res)) {
$id = 'skinexp' . $skinObj->sdnumber;
echo '<td><input type="checkbox" name="skin[',$skinObj->sdnumber,']" id="',$id,'" />';
- echo '<label for="',$id,'">',i18n::hsc($skinObj->sdname),'</label></td>';
- echo '<td>',i18n::hsc($skinObj->sddesc),'</td>';
+ echo '<label for="',$id,'">',ENTITY::hsc($skinObj->sdname),'</label></td>';
+ echo '<td>',ENTITY::hsc($skinObj->sddesc),'</td>';
echo '</tr><tr>';
}
while ($templateObj = sql_fetch_object($res)) {
$id = 'templateexp' . $templateObj->tdnumber;
echo '<td><input type="checkbox" name="template[',$templateObj->tdnumber,']" id="',$id,'" />';
- echo '<label for="',$id,'">',i18n::hsc($templateObj->tdname),'</label></td>';
- echo '<td>',i18n::hsc($templateObj->tddesc),'</td>';
+ echo '<label for="',$id,'">',ENTITY::hsc($templateObj->tdname),'</label></td>';
+ echo '<td>',ENTITY::hsc($templateObj->tddesc),'</td>';
echo '</tr><tr>';
}
<h2><?php echo _SKINIE_CONFIRM_TITLE?></h2>
<ul>
- <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo i18n::hsc($importer->getInfo())?></p></li>
+ <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo ENTITY::hsc($importer->getInfo())?></p></li>
<li><p><strong><?php echo _SKINIE_INFO_SKINS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getSkinNames())?></p></li>
<li><p><strong><?php echo _SKINIE_INFO_TEMPLATES?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getTemplateNames())?></p></li>
<?php
<form method="post" action="index.php"><div>
<input type="hidden" name="action" value="skiniedoimport" />
<?php $manager->addTicketHidden() ?>
- <input type="hidden" name="skinfile" value="<?php echo i18n::hsc(postVar('skinfile'))?>" />
- <input type="hidden" name="mode" value="<?php echo i18n::hsc($mode)?>" />
+ <input type="hidden" name="skinfile" value="<?php echo ENTITY::hsc(postVar('skinfile'))?>" />
+ <input type="hidden" name="mode" value="<?php echo ENTITY::hsc($mode)?>" />
<input type="submit" value="<?php echo _SKINIE_CONFIRM_IMPORT?>" />
<?php
if ($hasNameClashes)
<h2><?php echo _SKINIE_DONE?></h2>
<ul>
- <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo i18n::hsc($importer->getInfo())?></p></li>
+ <li><p><strong><?php echo _SKINIE_INFO_GENERAL?></strong> <?php echo ENTITY::hsc($importer->getInfo())?></p></li>
<li><p><strong><?php echo _SKINIE_INFO_IMPORTEDSKINS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getSkinNames())?></p></li>
<li><p><strong><?php echo _SKINIE_INFO_IMPORTEDTEMPLS?></strong> <?php echo implode(' <em>'._AND.'</em> ',$importer->getTemplateNames())?></p></li>
</ul>
<a href="index.php?action=templateoverview">(<?php echo _TEMPLATE_BACK?>)</a>
</p>
- <h2><?php echo _TEMPLATE_EDIT_TITLE?> '<?php echo i18n::hsc($templatename); ?>'</h2>
+ <h2><?php echo _TEMPLATE_EDIT_TITLE?> '<?php echo ENTITY::hsc($templatename); ?>'</h2>
<?php if ($msg) echo "<p>"._MESSAGE.": $msg</p>";
?>
<th colspan="2"><?php echo _TEMPLATE_SETTINGS?></th>
</tr><tr>
<td><?php echo _TEMPLATE_NAME?> <?php help('shortnames');?></td>
- <td><input name="tname" tabindex="4" size="20" maxlength="20" value="<?php echo i18n::hsc($templatename) ?>" /></td>
+ <td><input name="tname" tabindex="4" size="20" maxlength="20" value="<?php echo ENTITY::hsc($templatename) ?>" /></td>
</tr><tr>
<td><?php echo _TEMPLATE_DESC?></td>
- <td><input name="tdesc" tabindex="5" size="50" maxlength="200" value="<?php echo i18n::hsc($templatedescription) ?>" /></td>
+ <td><input name="tdesc" tabindex="5" size="50" maxlength="200" value="<?php echo ENTITY::hsc($templatedescription) ?>" /></td>
</tr><tr>
<th colspan="2"><?php echo _TEMPLATE_UPDATE?></th>
</tr><tr>
foreach ($pluginfields as $pfkey=>$pfvalue) {
echo "</tr><tr>\n";
- echo '<th colspan="2">' . i18n::hen($pfkey) . "</th>\n";
+ echo '<th colspan="2">' . ENTITY::hen($pfkey) . "</th>\n";
foreach ($pfvalue as $pffield=>$pfdesc) {
$this->_templateEditRow($template, $pfdesc, $pffield, '',++$tab,0);
}
?>
</tr><tr>
<td><?php echo $description?> <?php if ($help) help('template'.$help); ?></td>
- <td id="td<?php echo $count?>"><textarea class="templateedit" name="<?php echo $name?>" tabindex="<?php echo $tabindex?>" cols="50" rows="<?php echo $big?10:5?>" id="textarea<?php echo $count?>"><?php echo i18n::hsc($template[$name]); ?></textarea></td>
+ <td id="td<?php echo $count?>"><textarea class="templateedit" name="<?php echo $name?>" tabindex="<?php echo $tabindex?>" cols="50" rows="<?php echo $big?10:5?>" id="textarea<?php echo $count?>"><?php echo ENTITY::hsc($template[$name]); ?></textarea></td>
<?php $count++;
}
<h2><?php echo _DELETE_CONFIRM?></h2>
<p>
- <?php echo _CONFIRMTXT_TEMPLATE?><b><?php echo i18n::hsc($name)?></b> (<?php echo i18n::hsc($desc) ?>)
+ <?php echo _CONFIRMTXT_TEMPLATE?><b><?php echo ENTITY::hsc($name)?></b> (<?php echo ENTITY::hsc($desc) ?>)
</p>
<form method="post" action="index.php"><div>
$tabstart = 75;
while ($row = sql_fetch_assoc($res)) {
- echo '<li><a tabindex="' . ($tabstart++) . '" href="index.php?action=skinedittype&skinid=' . $skinid . '&type=' . i18n::hsc(strtolower($row['stype'])) . '">' . i18n::hsc(ucfirst($row['stype'])) . '</a> (<a tabindex="' . ($tabstart++) . '" href="index.php?action=skinremovetype&skinid=' . $skinid . '&type=' . i18n::hsc(strtolower($row['stype'])) . '">remove</a>)</li>';
+ echo '<li><a tabindex="' . ($tabstart++) . '" href="index.php?action=skinedittype&skinid=' . $skinid . '&type=' . ENTITY::hsc(strtolower($row['stype'])) . '">' . ENTITY::hsc(ucfirst($row['stype'])) . '</a> (<a tabindex="' . ($tabstart++) . '" href="index.php?action=skinremovetype&skinid=' . $skinid . '&type=' . ENTITY::hsc(strtolower($row['stype'])) . '">remove</a>)</li>';
}
echo '</ul>';
<input type="hidden" name="skinid" value="<?php echo $skinid ?>" />
<table><tr>
<td><?php echo _SKIN_NAME?> <?php help('shortnames');?></td>
- <td><input name="name" tabindex="90" value="<?php echo i18n::hsc($skin->getName()) ?>" maxlength="20" size="20" /></td>
+ <td><input name="name" tabindex="90" value="<?php echo ENTITY::hsc($skin->getName()) ?>" maxlength="20" size="20" /></td>
</tr><tr>
<td><?php echo _SKIN_DESC?></td>
- <td><input name="desc" tabindex="100" value="<?php echo i18n::hsc($skin->getDescription()) ?>" maxlength="200" size="50" /></td>
+ <td><input name="desc" tabindex="100" value="<?php echo ENTITY::hsc($skin->getDescription()) ?>" maxlength="200" size="50" /></td>
</tr><tr>
<td><?php echo _SKIN_TYPE?></td>
- <td><input name="type" tabindex="110" value="<?php echo i18n::hsc($skin->getContentType()) ?>" maxlength="40" size="20" /></td>
+ <td><input name="type" tabindex="110" value="<?php echo ENTITY::hsc($skin->getContentType()) ?>" maxlength="40" size="20" /></td>
</tr><tr>
<td><?php echo _SKIN_INCLUDE_MODE?> <?php help('includemode')?></td>
<td><?php $this->input_yesno('inc_mode',$skin->getIncludeMode(),120,'skindir','normal',_PARSER_INCMODE_SKINDIR,_PARSER_INCMODE_NORMAL);?></td>
</tr><tr>
<td><?php echo _SKIN_INCLUDE_PREFIX?> <?php help('includeprefix')?></td>
- <td><input name="inc_prefix" tabindex="130" value="<?php echo i18n::hsc($skin->getIncludePrefix()) ?>" maxlength="40" size="20" /></td>
+ <td><input name="inc_prefix" tabindex="130" value="<?php echo ENTITY::hsc($skin->getIncludePrefix()) ?>" maxlength="40" size="20" /></td>
</tr><tr>
<td><?php echo _SKIN_CHANGE?></td>
<td><input type="submit" tabindex="140" value="<?php echo _SKIN_CHANGE_BTN?>" onclick="return checkSubmit();" /></td>
?>
<p>(<a href="index.php?action=skinoverview"><?php echo _SKIN_GOBACK?></a>)</p>
- <h2><?php echo _SKIN_EDITPART_TITLE?> '<?php echo i18n::hsc($skin->getName()) ?>': <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?></h2>
+ <h2><?php echo _SKIN_EDITPART_TITLE?> '<?php echo ENTITY::hsc($skin->getName()) ?>': <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?></h2>
<?php if ($msg) echo "<p>"._MESSAGE.": $msg</p>";
?>
<input type="submit" value="<?php echo _SKIN_UPDATE_BTN?>" onclick="return checkSubmit();" />
<input type="reset" value="<?php echo _SKIN_RESET_BTN?>" />
- (skin type: <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
+ (skin type: <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
<?php if (in_array($type, array('index', 'item', 'archivelist', 'archive', 'search', 'error', 'member', 'imagepopup'))) {
help('skinpart' . $type);
} else {
}?>
<br />
- <textarea class="skinedit" tabindex="10" rows="20" cols="80" name="content"><?php echo i18n::hsc($skin->getContent($type)) ?></textarea>
+ <textarea class="skinedit" tabindex="10" rows="20" cols="80" name="content"><?php echo ENTITY::hsc($skin->getContent($type)) ?></textarea>
<br />
<input type="submit" tabindex="20" value="<?php echo _SKIN_UPDATE_BTN?>" onclick="return checkSubmit();" />
<input type="reset" value="<?php echo _SKIN_RESET_BTN?>" />
- (skin type: <?php echo i18n::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
+ (skin type: <?php echo ENTITY::hsc(isset($friendlyNames[$type]) ? $friendlyNames[$type] : ucfirst($type)); ?>)
<br /><br />
<?php echo _SKIN_ALLOWEDVARS?>
$query = 'SELECT bname FROM '.sql_table('blog').' WHERE bdefskin=' . $skinid;
$r = sql_query($query);
if ($o = sql_fetch_object($r))
- $this->error(_ERROR_SKINDEFDELETE . i18n::hsc($o->bname));
+ $this->error(_ERROR_SKINDEFDELETE . ENTITY::hsc($o->bname));
$this->pagehead();
<h2><?php echo _DELETE_CONFIRM?></h2>
<p>
- <?php echo _CONFIRMTXT_SKIN?><b><?php echo i18n::hsc($name) ?></b> (<?php echo i18n::hsc($desc)?>)
+ <?php echo _CONFIRMTXT_SKIN?><b><?php echo ENTITY::hsc($name) ?></b> (<?php echo ENTITY::hsc($desc)?>)
</p>
<form method="post" action="index.php"><div>
<h2><?php echo _DELETE_CONFIRM?></h2>
<p>
- <?php echo _CONFIRMTXT_SKIN_PARTS_SPECIAL; ?> <b><?php echo i18n::hsc($skintype); ?> (<?php echo i18n::hsc($name); ?>)</b> (<?php echo i18n::hsc($desc)?>)
+ <?php echo _CONFIRMTXT_SKIN_PARTS_SPECIAL; ?> <b><?php echo ENTITY::hsc($skintype); ?> (<?php echo ENTITY::hsc($name); ?>)</b> (<?php echo ENTITY::hsc($desc)?>)
</p>
<form method="post" action="index.php"><div>
<input type="hidden" name="action" value="skinremovetypeconfirm" />
<?php $manager->addTicketHidden() ?>
<input type="hidden" name="skinid" value="<?php echo $skinid; ?>" />
- <input type="hidden" name="type" value="<?php echo i18n::hsc($skintype); ?>" />
+ <input type="hidden" name="type" value="<?php echo ENTITY::hsc($skintype); ?>" />
<input type="submit" tabindex="10" value="<?php echo _DELETE_CONFIRM_BTN?>" />
</div></form>
<?php
</td>
</tr><tr>
<td><?php echo _SETTINGS_ADMINMAIL?></td>
- <td><input name="AdminEmail" tabindex="10010" size="40" value="<?php echo i18n::hsc($CONF['AdminEmail']) ?>" /></td>
+ <td><input name="AdminEmail" tabindex="10010" size="40" value="<?php echo ENTITY::hsc($CONF['AdminEmail']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_SITENAME?></td>
- <td><input name="SiteName" tabindex="10020" size="40" value="<?php echo i18n::hsc($CONF['SiteName']) ?>" /></td>
+ <td><input name="SiteName" tabindex="10020" size="40" value="<?php echo ENTITY::hsc($CONF['SiteName']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_SITEURL?></td>
- <td><input name="IndexURL" tabindex="10030" size="40" value="<?php echo i18n::hsc($CONF['IndexURL']) ?>" /></td>
+ <td><input name="IndexURL" tabindex="10030" size="40" value="<?php echo ENTITY::hsc($CONF['IndexURL']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_ADMINURL?></td>
- <td><input name="AdminURL" tabindex="10040" size="40" value="<?php echo i18n::hsc($CONF['AdminURL']) ?>" /></td>
+ <td><input name="AdminURL" tabindex="10040" size="40" value="<?php echo ENTITY::hsc($CONF['AdminURL']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_PLUGINURL?> <?php help('pluginurl');?></td>
- <td><input name="PluginURL" tabindex="10045" size="40" value="<?php echo i18n::hsc($CONF['PluginURL']) ?>" /></td>
+ <td><input name="PluginURL" tabindex="10045" size="40" value="<?php echo ENTITY::hsc($CONF['PluginURL']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_SKINSURL?> <?php help('skinsurl');?></td>
- <td><input name="SkinsURL" tabindex="10046" size="40" value="<?php echo i18n::hsc($CONF['SkinsURL']) ?>" /></td>
+ <td><input name="SkinsURL" tabindex="10046" size="40" value="<?php echo ENTITY::hsc($CONF['SkinsURL']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_ACTIONSURL?> <?php help('actionurl');?></td>
- <td><input name="ActionURL" tabindex="10047" size="40" value="<?php echo i18n::hsc($CONF['ActionURL']) ?>" /></td>
+ <td><input name="ActionURL" tabindex="10047" size="40" value="<?php echo ENTITY::hsc($CONF['ActionURL']) ?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_LANGUAGE?> <?php help('language'); ?>
</td>
</td>
<td><?php $this->input_yesno('DisableSite',$CONF['DisableSite'],10060); ?>
<br />
- <?php echo _SETTINGS_DISABLESITEURL ?> <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo i18n::hsc($CONF['DisableSiteURL'])?>" />
+ <?php echo _SETTINGS_DISABLESITEURL ?> <input name="DisableSiteURL" tabindex="10070" size="40" value="<?php echo ENTITY::hsc($CONF['DisableSiteURL'])?>" />
</td>
</tr><tr>
<td><?php echo _SETTINGS_DIRS?></td>
- <td><?php echo i18n::hsc($DIR_NUCLEUS) ?>
+ <td><?php echo ENTITY::hsc($DIR_NUCLEUS) ?>
<i><?php echo _SETTINGS_SEECONFIGPHP?></i></td>
</tr><tr>
<td><?php echo _SETTINGS_DBLOGIN?></td>
$CONF['DefaultListSize'] = 10;
}
?>
- <input name="DefaultListSize" tabindex="10079" size="40" value="<?php echo i18n::hsc((intval($CONF['DefaultListSize']) < 1 ? '10' : $CONF['DefaultListSize'])) ?>" />
+ <input name="DefaultListSize" tabindex="10079" size="40" value="<?php echo ENTITY::hsc((intval($CONF['DefaultListSize']) < 1 ? '10' : $CONF['DefaultListSize'])) ?>" />
</td>
</tr><tr>
<td><?php echo _SETTINGS_ADMINCSS?>
<th colspan="2"><?php echo _SETTINGS_MEDIA?> <?php help('media'); ?></th>
</tr><tr>
<td><?php echo _SETTINGS_MEDIADIR?></td>
- <td><?php echo i18n::hsc($DIR_MEDIA) ?>
+ <td><?php echo ENTITY::hsc($DIR_MEDIA) ?>
<i><?php echo _SETTINGS_SEECONFIGPHP?></i>
<?php if (!is_dir($DIR_MEDIA))
echo "<br /><b>" . _WARNING_NOTADIR . "</b>";
</tr><tr>
<td><?php echo _SETTINGS_MEDIAURL?></td>
<td>
- <input name="MediaURL" tabindex="10090" size="40" value="<?php echo i18n::hsc($CONF['MediaURL']) ?>" />
+ <input name="MediaURL" tabindex="10090" size="40" value="<?php echo ENTITY::hsc($CONF['MediaURL']) ?>" />
</td>
</tr><tr>
<td><?php echo _SETTINGS_ALLOWUPLOAD?></td>
</tr><tr>
<td><?php echo _SETTINGS_ALLOWUPLOADTYPES?></td>
<td>
- <input name="AllowedTypes" tabindex="10100" size="40" value="<?php echo i18n::hsc($CONF['AllowedTypes']) ?>" />
+ <input name="AllowedTypes" tabindex="10100" size="40" value="<?php echo ENTITY::hsc($CONF['AllowedTypes']) ?>" />
</td>
</tr><tr>
<td><?php echo _SETTINGS_MAXUPLOADSIZE?></td>
<td>
- <input name="MaxUploadSize" tabindex="10105" size="40" value="<?php echo i18n::hsc($CONF['MaxUploadSize']) ?>" />
+ <input name="MaxUploadSize" tabindex="10105" size="40" value="<?php echo ENTITY::hsc($CONF['MaxUploadSize']) ?>" />
</td>
</tr><tr>
<td><?php echo _SETTINGS_MEDIAPREFIX?></td>
<th colspan="2"><?php echo _SETTINGS_COOKIES_TITLE?> <?php help('cookies'); ?></th>
</tr><tr>
<td><?php echo _SETTINGS_COOKIEPREFIX?></td>
- <td><input name="CookiePrefix" tabindex="10159" size="40" value="<?php echo i18n::hsc($CONF['CookiePrefix'])?>" /></td>
+ <td><input name="CookiePrefix" tabindex="10159" size="40" value="<?php echo ENTITY::hsc($CONF['CookiePrefix'])?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_COOKIEDOMAIN?></td>
- <td><input name="CookieDomain" tabindex="10160" size="40" value="<?php echo i18n::hsc($CONF['CookieDomain'])?>" /></td>
+ <td><input name="CookieDomain" tabindex="10160" size="40" value="<?php echo ENTITY::hsc($CONF['CookieDomain'])?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_COOKIEPATH?></td>
- <td><input name="CookiePath" tabindex="10170" size="40" value="<?php echo i18n::hsc($CONF['CookiePath'])?>" /></td>
+ <td><input name="CookiePath" tabindex="10170" size="40" value="<?php echo ENTITY::hsc($CONF['CookiePath'])?>" /></td>
</tr><tr>
<td><?php echo _SETTINGS_COOKIESECURE?></td>
<td><?php $this->input_yesno('CookieSecure',$CONF['CookieSecure'],10180); ?></td>
}
else
{
- $value = i18n::hsc($value);
+ $value = ENTITY::hsc($value);
}
echo "<tr>\n";
echo '<td>' . $key . "</td>\n";
'extrahead' => &$extrahead,
'action' => $this->action));
- $baseUrl = i18n::hsc($CONF['AdminURL']);
+ $baseUrl = ENTITY::hsc($CONF['AdminURL']);
if ( !array_key_exists('AdminCSS',$CONF) )
{
sql_query("INSERT INTO ".sql_table('config')." VALUES ('AdminCSS', 'original')");
echo "<!DOCTYPE {$root_element} PUBLIC \"{$this->formal_public_identifier}\" \"{$this->system_identifier}\">\n";
echo "<{$root_element} xmlns=\"{$this->xhtml_namespace}\" xml:lang=\"{$locale}\" lang=\"{$locale}\">\n";
echo "<head>\n";
- echo '<title>' . i18n::hsc($CONF['SiteName']) . " - Admin</title>\n";
+ echo '<title>' . ENTITY::hsc($CONF['SiteName']) . " - Admin</title>\n";
echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}styles/admin_{$CONF["AdminCSS"]}.css\" />\n";
echo "<link rel=\"stylesheet\" title=\"Nucleus Admin Default\" type=\"text/css\" href=\"{$baseUrl}styles/addedit.css\" />\n";
echo "<script type=\"text/javascript\" src=\"{$baseUrl}javascript/edit.js\"></script>\n";
echo "<body>\n";
echo "<div id=\"adminwrapper\">\n";
echo "<div class=\"header\">\n";
- echo '<h1>' . i18n::hsc($CONF['SiteName']) . "</h1>\n";
+ echo '<h1>' . ENTITY::hsc($CONF['SiteName']) . "</h1>\n";
echo "</div>\n";
echo "<div id=\"container\">\n";
echo "<div id=\"content\">\n";
echo "<ul>\n";
foreach ( $aPluginExtras as $aInfo )
{
- echo '<li><a href="' . i18n::hsc($aInfo['url']) . '" title="' . i18n::hsc($aInfo['tooltip']) . '">' . i18n::hsc($aInfo['title']) . "</a></li>\n";
+ echo '<li><a href="' . ENTITY::hsc($aInfo['url']) . '" title="' . ENTITY::hsc($aInfo['tooltip']) . '">' . ENTITY::hsc($aInfo['title']) . "</a></li>\n";
}
echo "</ul>\n";
}
<?php echo _BOOKMARKLET_BMARKTEXT ?><small><?php echo _BOOKMARKLET_BMARKTEST ?></small>
<br />
<br />
- <?php echo '<a href="' . i18n::hsc($bm) . '">' . sprintf(_BOOKMARKLET_ANCHOR, i18n::hsc($blog->getName())) . '</a>' . _BOOKMARKLET_BMARKFOLLOW; ?>
+ <?php echo '<a href="' . ENTITY::hsc($bm) . '">' . sprintf(_BOOKMARKLET_ANCHOR, ENTITY::hsc($blog->getName())) . '</a>' . _BOOKMARKLET_BMARKFOLLOW; ?>
</p>
<h3><?php echo _BOOKMARKLET_RIGHTCLICK ?></h3>
$url = 'index.php?action=regfile&blogid=' . intval($blogid);
$url = $manager->addTicketToUrl($url);
?>
- <?php echo _BOOKMARKLET_RIGHTTEXT1 . '<a href="' . i18n::hsc($url, ENT_QUOTES, "SJIS") . '">' . _BOOKMARKLET_RIGHTLABEL . '</a>' . _BOOKMARKLET_RIGHTTEXT2; ?>
+ <?php echo _BOOKMARKLET_RIGHTTEXT1 . '<a href="' . ENTITY::hsc($url, ENT_QUOTES, "SJIS") . '">' . _BOOKMARKLET_RIGHTLABEL . '</a>' . _BOOKMARKLET_RIGHTTEXT2; ?>
</p>
<p>
?>
<h2><?php echo _ACTIONLOG_CLEAR_TITLE?></h2>
- <p><a href="<?php echo i18n::hsc($url)?>"><?php echo _ACTIONLOG_CLEAR_TEXT?></a></p>
+ <p><a href="<?php echo ENTITY::hsc($url)?>"><?php echo _ACTIONLOG_CLEAR_TEXT?></a></p>
<?php
echo '<h2>' . _ACTIONLOG_TITLE . '</h2>';
$member->blogAdminRights($blogid) or $this->disallow();
$blog =& $manager->getBlog($blogid);
- $banBlogName = i18n::hsc($blog->getName());
+ $banBlogName = ENTITY::hsc($blog->getName());
$this->pagehead();
?>
<h3><?php echo _BAN_IPRANGE?></h3>
<p>
- <?php echo _CONFIRMTXT_BAN?> <?php echo i18n::hsc($iprange) ?>
- <input name="iprange" type="hidden" value="<?php echo i18n::hsc($iprange)?>" />
+ <?php echo _CONFIRMTXT_BAN?> <?php echo ENTITY::hsc($iprange) ?>
+ <input name="iprange" type="hidden" value="<?php echo ENTITY::hsc($iprange)?>" />
</p>
<h3><?php echo _BAN_BLOGS?></h3>
echo "<ul>";
foreach ($deleted as $delblog) {
$b =& $manager->getBlog($delblog);
- echo "<li>" . i18n::hsc($b->getName()). "</li>";
+ echo "<li>" . ENTITY::hsc($b->getName()). "</li>";
}
echo "</ul>";
<div>
<?php
if ($ip) {
- $iprangeVal = i18n::hsc($ip);
+ $iprangeVal = ENTITY::hsc($ip);
?>
<input name="iprange" type="radio" value="<?php echo $iprangeVal ?>" checked="checked" id="ip_fixed" />
<label for="ip_fixed"><?php echo $iprangeVal ?></label>
<div>
<input type="hidden" name="blogid" value="<?php echo $blogid?>" />
- <input name="allblogs" type="radio" value="0" id="allblogs_one" /><label for="allblogs_one">'<?php echo i18n::hsc($blog->getName())?>'</label>
+ <input name="allblogs" type="radio" value="0" id="allblogs_one" /><label for="allblogs_one">'<?php echo ENTITY::hsc($blog->getName())?>'</label>
<br />
<input name="allblogs" type="radio" value="1" checked="checked" id="allblogs_all" /><label for="allblogs_all"><?php echo _BAN_ALLBLOGS?></label>
</div>
<?php
foreach($candidates as $name)
{
- echo '<option value="NP_',$name,'">',i18n::hsc($name),'</option>';
+ echo '<option value="NP_',$name,'">',ENTITY::hsc($name),'</option>';
}
?>
</select>
echo '<p><a href="index.php?action=pluginlist">(',_PLUGS_BACK,')</a></p>';
- echo '<h2>',_PLUGS_HELP_TITLE,': ',i18n::hsc($plugName),'</h2>';
+ echo '<h2>',_PLUGS_HELP_TITLE,': ',ENTITY::hsc($plugName),'</h2>';
$plug =& $manager->getPlugin($plugName);
$helpFile = $DIR_PLUGINS.$plug->getShortName().'/help.html';
if ($manager->pluginInstalled($name))
$this->error(_ERROR_DUPPLUGIN);
if (!checkPlugin($name))
- $this->error(_ERROR_PLUGFILEERROR . ' (' . i18n::hsc($name) . ')');
+ $this->error(_ERROR_PLUGFILEERROR . ' (' . ENTITY::hsc($name) . ')');
// get number of currently installed plugins
$res = sql_query('SELECT * FROM '.sql_table('plugin'));
$this->deleteOnePlugin($plugin->getID());
// ...and show error
- $this->error(_ERROR_NUCLEUSVERSIONREQ . i18n::hsc($plugin->getMinNucleusVersion()));
+ $this->error(_ERROR_NUCLEUSVERSIONREQ . ENTITY::hsc($plugin->getMinNucleusVersion()));
}
// check if plugin needs a newer Nucleus version
$this->deleteOnePlugin($plugin->getID());
// ...and show error
- $this->error(_ERROR_NUCLEUSVERSIONREQ . i18n::hsc( $plugin->getMinNucleusVersion() . ' patch ' . $plugin->getMinNucleusPatchLevel() ) );
+ $this->error(_ERROR_NUCLEUSVERSIONREQ . ENTITY::hsc( $plugin->getMinNucleusVersion() . ' patch ' . $plugin->getMinNucleusPatchLevel() ) );
}
$pluginList = $plugin->getPluginDep();
// uninstall plugin again...
$this->deleteOnePlugin($plugin->getID());
- $this->error(sprintf(_ERROR_INSREQPLUGIN, i18n::hsc($pluginName)));
+ $this->error(sprintf(_ERROR_INSREQPLUGIN, ENTITY::hsc($pluginName)));
}
}
$extrahead = "<script type=\"text/javascript\" src=\"javascript/numbercheck.js\"></script>\n";
$this->pagehead($extrahead);
echo '<p><a href="index.php?action=pluginlist">(' . _PLUGS_BACK . ")</a></p>\n";
- echo '<h2>' . sprintf(_PLUGIN_OPTIONS_TITLE, i18n::hsc($pname)) . "</h2>\n";
+ echo '<h2>' . sprintf(_PLUGIN_OPTIONS_TITLE, ENTITY::hsc($pname)) . "</h2>\n";
if ( isset($message) )
{
{
define('_PLUGIN_OPTIONS_TITLE', 'Options for %s');
}
- echo '<tr><th colspan="2">'.sprintf(_PLUGIN_OPTIONS_TITLE, i18n::hsc($aOption['pfile'])).'</th></tr>';
+ echo '<tr><th colspan="2">'.sprintf(_PLUGIN_OPTIONS_TITLE, ENTITY::hsc($aOption['pfile'])).'</th></tr>';
}
$meta = NucleusPlugin::getOptionMeta($aOption['typeinfo']);
$id_no = $id . $value_no;
/* yes option */
- echo '<input type="radio" id="' . i18n::hsc($id_yes) . '" name="' . i18n::hsc($name) . '" value="' . i18n::hsc($value_yes) . '"';
+ echo '<input type="radio" id="' . ENTITY::hsc($id_yes) . '" name="' . ENTITY::hsc($name) . '" value="' . ENTITY::hsc($value_yes) . '"';
if ( $name=="admin" )
{
echo ' onclick="selectCanLogin(true);"';
echo " tabindex='$tabindex' checked='checked'";
}
echo " />\n";
- echo '<label for="' . i18n::hsc($id_yes) . '">' . i18n::hsc($text_yes) . "</label>\n";
+ echo '<label for="' . ENTITY::hsc($id_yes) . '">' . ENTITY::hsc($text_yes) . "</label>\n";
/* no option */
- echo '<input type="radio" id="' . i18n::hsc($id_no) . '" name="' . i18n::hsc($name) . '" value="' . i18n::hsc($value_no) . '"';
+ echo '<input type="radio" id="' . ENTITY::hsc($id_no) . '" name="' . ENTITY::hsc($name) . '" value="' . ENTITY::hsc($value_no) . '"';
if ( $name=="admin" )
{
echo ' onclick="selectCanLogin(false);"';
echo ' disabled="disabled"';
}
echo " />\n";
- echo '<label for="' . i18n::hsc($id_no) . '">' . i18n::hsc($text_no) . "</label>\n";
+ echo '<label for="' . ENTITY::hsc($id_no) . '">' . ENTITY::hsc($text_no) . "</label>\n";
return;
}
{
$template =& $manager->getTemplate($template);
$vars = array(
- 'query' => i18n::hsc($query),
+ 'query' => ENTITY::hsc($query),
'blogid' => $this->getID()
);
echo TEMPLATE::fill($template['SEARCH_NOTHINGFOUND'],$vars);
$windowwidth = $width;
$windowheight = $height;
- $vars['link'] = i18n::hsc($CONF['MediaURL']. $filename);
- $vars['text'] = i18n::hsc($text);
+ $vars['link'] = ENTITY::hsc($CONF['MediaURL']. $filename);
+ $vars['text'] = ENTITY::hsc($text);
$vars['image'] = '<img src="' . $vars['link'] . '" width="' . $width . '" height="' . $height . '" alt="' . $vars['text'] . '" title="' . $vars['text'] . '" />';
$vars['width'] = $width;
$vars['height'] = $height;
$filename = $this->currentItem->authorid . '/' . $filename;
}
- $vars['link'] = i18n::hsc($CONF['MediaURL'] . $filename);
- $vars['text'] = i18n::hsc($text);
+ $vars['link'] = ENTITY::hsc($CONF['MediaURL'] . $filename);
+ $vars['text'] = ENTITY::hsc($text);
$vars['media'] = '<a href="' . $vars['link'] . '">' . $vars['text'] . '</a>';
echo TEMPLATE::fill($this->template['MEDIA_CODE'],$vars);;
$windowwidth = $width;
$windowheight = $height;
- $vars['rawpopuplink'] = $CONF['Self'] . "?imagepopup=" . i18n::hsc($filename) . "&width=$width&height=$height&imagetext=" . urlencode(i18n::hsc($text));
+ $vars['rawpopuplink'] = $CONF['Self'] . "?imagepopup=" . ENTITY::hsc($filename) . "&width=$width&height=$height&imagetext=" . urlencode(ENTITY::hsc($text));
$vars['popupcode'] = "window.open(this.href,'imagepopup','status=no,toolbar=no,scrollbars=no,resizable=yes,width=$windowwidth,height=$windowheight');return false;";
- $vars['popuptext'] = i18n::hsc($text);
+ $vars['popuptext'] = ENTITY::hsc($text);
$vars['popuplink'] = '<a href="' . $vars['rawpopuplink']. '" onclick="'. $vars['popupcode'].'" >' . $vars['popuptext'] . '</a>';
$vars['width'] = $width;
$vars['height'] = $height;
$vars['text'] = $text;
- $vars['link'] = i18n::hsc($CONF['MediaURL'] . $filename);
+ $vars['link'] = ENTITY::hsc($CONF['MediaURL'] . $filename);
$vars['media'] = '<a href="' . $vars['link'] . '">' . $vars['popuptext'] . '</a>';
echo TEMPLATE::fill($this->template['POPUP_CODE'],$vars);
$body = preg_replace("/\n{3,}/", "\n\n", $body);
// encode special characters as entities
- $body = i18n::hsc($body);
+ $body = ENTITY::hsc($body);
// trim away whitespace and newlines at beginning and end
$body = trim($body);
$displayedUrl = $url;
}
- return $pre . '<a href="' . $linkedUrl . '" rel="nofollow">' . i18n::hsc(shorten($displayedUrl,30,'...')) . '</a>' . $post;
+ return $pre . '<a href="' . $linkedUrl . '" rel="nofollow">' . ENTITY::hsc(shorten($displayedUrl,30,'...')) . '</a>' . $post;
}
}
else
{
- echo i18n::hsc($this->currentComment['user']);
+ echo ENTITY::hsc($this->currentComment['user']);
}
}
$minamount = $this->minamount;
$maxamount = $this->maxamount;
$blogid = $this->blogid;
- $search = i18n::hsc($this->search);
+ $search = ENTITY::hsc($this->search);
$itemid = $this->itemid;
$prev = $start - $amount;
*/
function parse_syndicate_title($maxLength = 100) {
$syndicated = strip_tags($this->currentItem->title);
- echo i18n::hsc(shorten($syndicated,$maxLength,'...'));
+ echo ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
}
/**
function parse_syndicate_description($maxLength = 250, $addHighlight = 0) {
$syndicated = strip_tags($this->currentItem->body);
if ($addHighlight) {
- $tmp_highlight = i18n::hsc(shorten($syndicated,$maxLength,'...'));
+ $tmp_highlight = ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
echo $this->highlightAndParse($tmp_highlight);
} else {
- echo i18n::hsc(shorten($syndicated,$maxLength,'...'));
+ echo ENTITY::hsc(shorten($syndicated,$maxLength,'...'));
}
}
function addTicketHidden()
{
$ticket = $this->_generateTicket();
- echo '<input type="hidden" name="ticket" value="', i18n::hsc($ticket), '" />';
+ echo '<input type="hidden" name="ticket" value="', ENTITY::hsc($ticket), '" />';
return;
}
*/
function parse_bloglink()
{
- echo '<a href="', i18n::hsc($this->blog->getURL()), '">', i18n::hsc($this->blog->getName()), '</a>';
+ echo '<a href="', ENTITY::hsc($this->blog->getURL()), '">', ENTITY::hsc($this->blog->getName()), '</a>';
}
function parse_contents($which)
{
if (!isset($this->variables[$which])) $this->variables[$which] = '';
- echo i18n::hsc($this->variables[$which]);
+ echo ENTITY::hsc($this->variables[$which]);
}
function start($extraHead = '')
{
global $CONF;
- $strBaseHref = '<base href="' . i18n::hsc($CONF['AdminURL']) . '" />';
+ $strBaseHref = '<base href="' . ENTITY::hsc($CONF['AdminURL']) . '" />';
$extraHead .= $strBaseHref;
$this->admin->pagehead($extraHead);
//echo "\n<!--TicketForPlugin skipped-->\n";
return;
}
- $ticket=i18n::hsc($ticket);
+ $ticket=ENTITY::hsc($ticket);
?><script type="text/javascript">
/*<![CDATA[*/
+++ /dev/null
-<?php
-
-class entity {
-
- function named_to_numeric ($string) {
- $string = preg_replace('/(&[0-9A-Za-z]+)(;?\=?|([^A-Za-z0-9\;\:\.\-\_]))/e', "entity::_named('\\1', '\\2') . '\\3'", $string);
- return $string;
- }
-
- function normalize_numeric ($string) {
- global $_entities;
- $string = preg_replace('/&#([0-9]+)(;)?/e', "'&#x'.dechex('\\1').';'", $string);
- $string = preg_replace('/&#[Xx](0)*([0-9A-Fa-f]+)(;?|([^A-Za-z0-9\;\:\.\-\_]))/e', "'&#x' . strtoupper('\\2') . ';\\4'", $string);
- $string = strtr($string, $_entities['cp1251']);
- return $string;
- }
-
- function numeric_to_utf8 ($string) {
- $string = preg_replace('/&#([0-9]+)(;)?/e', "'&#x'.dechex('\\1').';'", $string);
- $string = preg_replace('/&#[Xx](0)*([0-9A-Fa-f]+)(;?|([^A-Za-z0-9\;\:\.\-\_]))/e', "'&#x' . strtoupper('\\2') . ';\\4'", $string);
- $string = preg_replace('/&#x([0-9A-Fa-f]+);/e', "entity::_hex_to_utf8('\\1')", $string);
- return $string;
- }
-
- function numeric_to_named ($string) {
- global $_entities;
- $string = preg_replace('/&#[Xx]([0-9A-Fa-f]+)/e', "'&#'.hexdec('\\1')", $string);
- $string = strtr($string, array_flip($_entities['named']));
- return $string;
- }
-
- function specialchars ($string, $type = 'xml') {
- $apos = $type == 'xml' ? ''' : ''';
- $specialchars = array (
- '"' => '"', '&' => '&',
- ''' => $apos, '<' => '<',
- '>' => '>', '"' => '"',
- '&' => '&', "'" => $apos,
- '<' => '<', '>' => '>'
- );
-
- $string = preg_replace('/&(#?[Xx]?[0-9A-Za-z]+);/', "[[[ENTITY:\\1]]]", $string);
- $string = strtr($string, $specialchars);
- $string = preg_replace('/\[\[\[ENTITY\:([^\]]+)\]\]\]/', "&\\1;", $string);
- return $string;
- }
-
-
- function _hex_to_utf8($s)
- {
- $c = hexdec($s);
-
- if ($c < 0x80) {
- $str = chr($c);
- }
- else if ($c < 0x800) {
- $str = chr(0xC0 | $c>>6) . chr(0x80 | $c & 0x3F);
- }
- else if ($c < 0x10000) {
- $str = chr(0xE0 | $c>>12) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F);
- }
- else if ($c < 0x200000) {
- $str = chr(0xF0 | $c>>18) . chr(0x80 | $c>>12 & 0x3F) . chr(0x80 | $c>>6 & 0x3F) . chr(0x80 | $c & 0x3F);
- }
-
- return $str;
- }
-
- function _named($entity, $extra) {
- global $_entities;
-
- if ($extra == '=') return $entity . '=';
-
- $length = i18n::strlen($entity);
-
- while ($length > 0) {
- $check = i18n::substr($entity, 0, $length);
- if (isset($_entities['named'][$check])) return $_entities['named'][$check] . ';' . i18n::substr($entity, $length);
- $length--;
- }
-
- return $entity . ($extra == ';' ? ';' : '');
- }
-}
-
-
-$_entities['cp1251'] = array (
- '€' => '€', '‚' => '‚', 'ƒ' => 'ƒ',
- '„' => '„', '…' => '…', '†' => '†',
- '‡' => '‡', 'ˆ' => 'ˆ', '‰' => '‰',
- 'Š' => 'Š', '‹' => '‹', 'Œ' => 'Œ',
- 'Ž' => 'Ž', '‘' => '‘', '’' => '’',
- '“' => '“', '”' => '”', '•' => '•',
- '–' => '–', '—' => '—', '˜' => '˜',
- '™' => '™', 'š' => 'š', '›' => '›',
- 'œ' => 'œ', 'ž' => 'ž', 'Ÿ' => 'Ÿ',
-);
-
-$_entities['named'] = array (
- ' ' => ' ', '¡' => '¡', '¢' => '¢',
- '£' => '£', '¤' => '¤', '¥' => '¥',
- '¦' => '¦', '§' => '§', '¨' => '¨',
- '©' => '©', 'ª' => 'ª', '«' => '«',
- '¬' => '¬', '­' => '­', '®' => '®',
- '¯' => '¯', '°' => '°', '±' => '±',
- '²' => '²', '³' => '³', '´' => '´',
- 'µ' => 'µ', '¶' => '¶', '·' => '·',
- '¸' => '¸', '¹' => '¹', 'º' => 'º',
- '»' => '»', '¼' => '¼', '½' => '½',
- '¾' => '¾', '¿' => '¿', 'À' => 'À',
- 'Á' => 'Á', 'Â' => 'Â', 'Ã' => 'Ã',
- 'Ä' => 'Ä', 'Å' => 'Å', 'Æ' => 'Æ',
- 'Ç' => 'Ç', 'È' => 'È', 'É' => 'É',
- 'Ê' => 'Ê', 'Ë' => 'Ë', 'Ì' => 'Ì',
- 'Í' => 'Í', 'Î' => 'Î', 'Ï' => 'Ï',
- 'Ð' => 'Ð', 'Ñ' => 'Ñ', 'Ò' => 'Ò',
- 'Ó' => 'Ó', 'Ô' => 'Ô', 'Õ' => 'Õ',
- 'Ö' => 'Ö', '×' => '×', 'Ø' => 'Ø',
- 'Ù' => 'Ù', 'Ú' => 'Ú', 'Û' => 'Û',
- 'Ü' => 'Ü', 'Ý' => 'Ý', 'Þ' => 'Þ',
- 'ß' => 'ß', 'à' => 'à', 'á' => 'á',
- 'â' => 'â', 'ã' => 'ã', 'ä' => 'ä',
- 'å' => 'å', 'æ' => 'æ', 'ç' => 'ç',
- 'è' => 'è', 'é' => 'é', 'ê' => 'ê',
- 'ë' => 'ë', 'ì' => 'ì', 'í' => 'í',
- 'î' => 'î', 'ï' => 'ï', 'ð' => 'ð',
- 'ñ' => 'ñ', 'ò' => 'ò', 'ó' => 'ó',
- 'ô' => 'ô', 'õ' => 'õ', 'ö' => 'ö',
- '÷' => '÷', 'ø' => 'ø', 'ù' => 'ù',
- 'ú' => 'ú', 'û' => 'û', 'ü' => 'ü',
- 'ý' => 'ý', 'þ' => 'þ', 'ÿ' => 'ÿ',
- '&OElig' => 'Œ', '&oelig' => 'å', '&Scaron' => 'Š',
- '&scaron' => 'š', '&Yuml' => 'Ÿ', '&circ' => 'ˆ',
- '&tilde' => '˜', '&esnp' => ' ', '&emsp' => ' ',
- '&thinsp' => ' ', '&zwnj' => '‌', '&zwj' => '‍',
- '&lrm' => '‎', '&rlm' => '‏', '&ndash' => '–',
- '&mdash' => '—', '&lsquo' => '‘', '&rsquo' => '’',
- '&sbquo' => '‚', '&ldquo' => '“', '&rdquo' => '”',
- '&bdquo' => '„', '&dagger' => '†', '&Dagger' => '‡',
- '&permil' => '‰', '&lsaquo' => '‹', '&rsaquo' => '›',
- '&euro' => '€', '&fnof' => 'ƒ', '&Alpha' => 'Α',
- '&Beta' => 'Β', '&Gamma' => 'Γ', '&Delta' => 'Δ',
- '&Epsilon' => 'Ε', '&Zeta' => 'Ζ', '&Eta' => 'Η',
- '&Theta' => 'Θ', '&Iota' => 'Ι', '&Kappa' => 'Κ',
- '&Lambda' => 'Λ', '&Mu' => 'Μ', '&Nu' => 'Ν',
- '&Xi' => 'Ξ', '&Omicron' => 'Ο', '&Pi' => 'Π',
- '&Rho' => 'Ρ', '&Sigma' => 'Σ', '&Tau' => 'Τ',
- '&Upsilon' => 'Υ', '&Phi' => 'Φ', '&Chi' => 'Χ',
- '&Psi' => 'Ψ', '&Omega' => 'Ω', '&alpha' => 'α',
- '&beta' => 'β', '&gamma' => 'γ', '&delta' => 'δ',
- '&epsilon' => 'ε', '&zeta' => 'ζ', '&eta' => 'η',
- '&theta' => 'θ', '&iota' => 'ι', '&kappa' => 'κ',
- '&lambda' => 'λ', '&mu' => 'μ', '&nu' => 'ν',
- '&xi' => 'ξ', '&omicron' => 'ο', '&pi' => 'π',
- '&rho' => 'ρ', '&sigmaf' => 'ς', '&sigma' => 'σ',
- '&tau' => 'τ', '&upsilon' => 'υ', '&phi' => 'φ',
- '&chi' => 'χ', '&psi' => 'ψ', '&omega' => 'ω',
- '&thetasym' => 'ϑ', '&upsih' => 'ϒ', '&piv' => 'ϖ',
- '&bull' => '•', '&hellip' => '…', '&prime' => '′',
- '&Prime' => '″', '&oline' => '‾', '&frasl' => '⁄',
- '&weierp' => '℘', '&image' => 'ℑ', '&real' => 'ℜ',
- '&trade' => '™', '&alefsym' => 'ℵ', '&larr' => '←',
- '&uarr' => '↑', '&rarr' => '→', '&darr' => '↓',
- '&harr' => '↔', '&crarr' => '↵', '&lArr' => '⇐',
- '&uArr' => '⇑', '&rArr' => '⇒', '&dArr' => '⇓',
- '&hArr' => '⇔', '&forall' => '∀', '&part' => '∂',
- '&exist' => '∃', '&empty' => '∅', '&nabla' => '∇',
- '&isin' => '∈', '¬in' => '∉', '&ni' => '∋',
- '&prod' => '∏', '&sum' => '∑', '&minus' => '−',
- '&lowast' => '∗', '&radic' => '√', '&prop' => '∝',
- '&infin' => '∞', '&ang' => '∠', '&and' => '∧',
- '&or' => '∨', '&cap' => '∩', '&cup' => '∪',
- '&int' => '∫', '&there4' => '∴', '&sim' => '∼',
- '&cong' => '≅', '&asymp' => '≈', '&ne' => '≠',
- '&equiv' => '≡', '&le' => '≤', '&ge' => '≥',
- '&sub' => '⊂', '&sup' => '⊃', '&nsub' => '⊄',
- '&sube' => '⊆', '&supe' => '⊇', '&oplus' => '⊕',
- '&otimes' => '⊗', '&perp' => '⊥', '&sdot' => '⋅',
- '&lceil' => '⌈', '&rceil' => '⌉', '&lfloor' => '⌊',
- '&rfloor' => '⌋', '&lang' => '〈', '&rang' => '〉',
- '&loz' => '◊', '&spades' => '♠', '&clubs' => '♣',
- '&hearts' => '♥', '&diams' => '♦',
-);
-
-
-?>
\ No newline at end of file
include($DIR_LIBS . 'BAN.php');
include($DIR_LIBS . 'PAGEFACTORY.php');
include($DIR_LIBS . 'SEARCH.php');
-include($DIR_LIBS . 'entity.php');
+include($DIR_LIBS . 'ENTITY.php');
include($DIR_LIBS . 'Link.php');
/* set lastVisit cookie (if allowed) */
/**
- * This function highlights a specific query in a given HTML text (not within HTML tags) and returns it
- * @param string $text text to be highlighted
- * @param string $expression regular expression to be matched (can be an array of expressions as well)
- * @param string $highlight highlight to be used (use \\0 to indicate the matched expression)
- * @return string
- */
- function highlight($text, $expression, $highlight)
- {
-
- if ( !$highlight || !$expression )
- {
- return $text;
- }
-
- if ( is_array($expression) && (count($expression) == 0) )
- {
- return $text;
- }
-
- // add a tag in front (is needed for preg_match_all to work correctly)
- $text = '<!--h-->' . $text;
-
- // split the HTML up so we have HTML tags
- // $matches[0][i] = HTML + text
- // $matches[1][i] = HTML
- // $matches[2][i] = text
- preg_match_all('/(<[^>]+>)([^<>]*)/', $text, $matches);
-
- // throw it all together again while applying the highlight to the text pieces
- $result = '';
-
- $count_matches = count($matches[2]);
-
- for ( $i = 0; $i < $count_matches; $i++ )
- {
-
- if ( $i != 0 )
- {
- $result .= $matches[1][$i];
- }
-
- if ( is_array($expression) )
- {
-
- foreach ( $expression as $regex )
- {
-
- if ( $regex )
- {
- //$matches[2][$i] = @eregi_replace($regex, $highlight, $matches[2][$i]);
- $matches[2][$i] = @preg_replace('#' . $regex . '#i', $highlight, $matches[2][$i]);
- }
-
- }
-
- $result .= $matches[2][$i];
-
- }
- else
- {
- //$result .= @eregi_replace($expression, $highlight, $matches[2][$i]);
- $result .= @preg_replace('#' . $expression . '#i', $highlight, $matches[2][$i]);
- }
-
- }
-
- return $result;
-
- }
-
-
- /**
* This function parses a query into an array of expressions that can be passed on to the highlight method
* @param string $query
*/
}
}
+
/**
* This function gets the blog ID from the blog name
* @param string $name
}
/**
- * shortens a text string to maxlength.
- * $suffix is what needs to be added at the end (end length is <= $maxlength)
- *
- * The purpose is to limit the width of string for rendered screen in web browser.
- * So it depends on style sheet, browser's rendering scheme, client's system font.
- *
- * NOTE: In general, non-Latin font such as Japanese, Chinese, Cyrillic have two times as width as Latin fonts,
- * but this is not always correct, for example, rendered by proportional font.
- *
- * @param string $escaped_string target string
- * @param integer $maxlength maximum length of return string which includes suffix
- * @param string $suffix added in the end of shortened-string
- * @return string
-*/
-function shorten($string, $maxlength, $suffix)
-{
- static $flag;
-
- $decoded_entities_pcre = array();
- $encoded_entities = array();
-
- /* 1. store html entities */
- preg_match('#&[^&]+?;#', $string, $encoded_entities);
- if ( !$encoded_entities )
- {
- $flag = FALSE;
- }
- else
- {
- $flag = TRUE;
- }
- if ( $flag )
- {
- foreach ( $encoded_entities as $encoded_entity )
- {
- $decoded_entities_pcre[] = '#' . html_entity_decode($encoded_entity, ENT_QUOTES, i18n::get_current_charset()) . '#';
- }
- }
-
- /* 2. decode string */
- $string = html_entity_decode($string, ENT_QUOTES, i18n::get_current_charset());
-
- /* 3. shorten string and add suffix if string length is longer */
- if ( i18n::strlen($string) > $maxlength - i18n::strlen($suffix) )
- {
- $string = i18n::substr($string, 0, $maxlength - i18n::strlen($suffix) );
- $string .= $suffix;
- }
-
- /* 4. recover entities */
- if ( $flag )
- {
- $string = preg_replace($decoded_entities_pcre, $encoded_entities, $string);
- }
-
- return $string;
-}
-
-/**
* Converts a unix timestamp to a mysql DATETIME format, and places
* quotes around it.
*/
}
/**
- * Deprecated since 4.0:
- * Please use functions in MAIL class instead
- */
-function getMailFooter()
-{
- NOTIFICATION::get_mail_footer();
-}
-function isValidMailAddress($address)
-{
- return NOTIFICATION::address_validation($address);
-}
-
-/*
- * Returns the name of the language to use
- * preference priority: member - site
- * defaults to english-utf8 when no good language found
- *
- * NOTE: Deprecated, plugins to use this function should be re-worked as soon as possible!
- * TODO: this will be obsoleted soon.
- */
-function getLanguageName()
-{
- if( ($language = i18n::convert_locale_to_old_language_file_name(i18n::get_current_locale())) === FALSE )
- {
- $language ='english';
- }
- return $language;
-}
-
-/**
* Includes a PHP file. This method can be called while parsing templates and skins
*/
function includephp($filename) {
}
/**
- * Checks if a certain language exists
- * @param string $lang
- * @return bool
- *
- * NOTE: Deprecated, plugins to use this function should be re-worked as soon as possible!
- * TODO: this will be obsoleted soon.
- **/
-function checkLanguage($lang)
-{
- return ( preg_match('#^(.+)_(.+)_(.+)$#', $lang)
- || i18n::convert_old_language_file_name_to_locale($lang) );
-}
-
-/**
* Checks if a certain plugin exists
* @param string $plug
* @return bool
}
/**
- * Centralisation of the functions that generate links
- * Deprecated since 3.70:
- * Please use Link::FunctionName(...) instead
- */
-function createItemLink($itemid, $extra = '') {
- return Link::createItemLink($itemid, $extra);
-}
-
-function createMemberLink($memberid, $extra = '') {
- return Link::createMemberLink($memberid, $extra);
-}
-
-function createCategoryLink($catid, $extra = '') {
- return Link::createCategoryLink($catid, $extra);
-}
-
-function createArchiveListLink($blogid = '', $extra = '') {
- return Link::createArchiveListLink($blogid, $extra);
-}
-
-function createArchiveLink($blogid, $archive, $extra = '') {
- return Link::createArchiveLink($blogid, $archive, $extra);
-}
-
-function createBlogidLink($blogid, $params = '') {
- return Link::createBlogidLink($blogid, $params = '');
-}
-
-function createLink($type, $params) {
- return Link::createLink($type, $params);
-}
-
-function createBlogLink($url, $params) {
- return Link::createBlogLink($url, $params);
-}
-
-
-/**
* @param $querystr
* querystring to alter (e.g. foo=1&bar=2&x=y)
* @param $param
}
// other values: do stripslashes if needed
- ?><input type="hidden" name="<?php echo i18n::hsc($key)?>" value="<?php echo i18n::hsc(undoMagic($value) )?>" /><?php
-}
-
-/*
- Date format functions (to be used from [%date(..)%] skinvars
-*/
-function formatDate($format, $timestamp, $defaultFormat, &$blog) {
- // apply blog offset (#42)
- $boffset = $blog ? $blog->getTimeOffset() * 3600 : 0;
- $offset = date('Z', $timestamp) + $boffset;
-
- switch ($format) {
- case 'rfc822':
- if ($offset >= 0) {
- $tz = '+';
- } else {
- $tz = '-';
- $offset = -$offset;
- }
-
- $tz .= sprintf("%02d%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
- return date('D, j M Y H:i:s ', $timestamp) . $tz;
-
- case 'rfc822GMT':
- $timestamp -= $offset;
- return date('D, j M Y H:i:s ', $timestamp) . 'GMT';
-
- case 'utc':
- $timestamp -= $offset;
- return date('Y-m-d\TH:i:s\Z', $timestamp);
-
- case 'iso8601':
- if ($offset >= 0) {
- $tz = '+';
- } else {
- $tz = '-';
- $offset = -$offset;
- }
- $tz .= sprintf("%02d:%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
- return date('Y-m-d\TH:i:s', $timestamp) . $tz;
-
- default :
- return i18n::strftime($format ? $format : $defaultFormat, $timestamp);
- }
+ ?><input type="hidden" name="<?php echo ENTITY::hsc($key)?>" value="<?php echo ENTITY::hsc(undoMagic($value) )?>" /><?php
}
function checkVars($aVars) {
$qstring = '?' . $qstring;
}
- echo '<p>' . _SETTINGS_UPDATE . ' : ' . _QMENU_PLUGINS . ' <span style="color:red;">' . i18n::hsc($plugin_name) . "</span> ?</p>\n";
+ echo '<p>' . _SETTINGS_UPDATE . ' : ' . _QMENU_PLUGINS . ' <span style="color:red;">' . ENTITY::hsc($plugin_name) . "</span> ?</p>\n";
switch(strtoupper(serverVar('REQUEST_METHOD') ) )
{
case 'POST':
- echo '<form method="POST" action="'.i18n::hsc($uri.$qstring).'">';
+ echo '<form method="POST" action="'.ENTITY::hsc($uri.$qstring).'">';
$manager->addTicketHidden();
_addInputTags($post);
break;
case 'GET':
- echo '<form method="GET" action="'.i18n::hsc($uri).'">';
+ echo '<form method="GET" action="'.ENTITY::hsc($uri).'">';
$manager->addTicketHidden();
_addInputTags($get);
else {
if (get_magic_quotes_gpc()) $value=stripslashes($value);
if ($key=='ticket') continue;
- echo '<input type="hidden" name="'.i18n::hsc($key).
- '" value="'.i18n::hsc($value).'" />'."\n";
+ echo '<input type="hidden" name="'.ENTITY::hsc($key).
+ '" value="'.ENTITY::hsc($value).'" />'."\n";
}
}
}
}
/**
- * Strip HTML tags from a string
- * This function is a bit more intelligent than a regular call to strip_tags(),
- * because it also deletes the contents of certain tags and cleans up any
- * unneeded whitespace.
- */
-function stringStripTags ($string) {
- $string = preg_replace("/<del[^>]*>.+<\/del[^>]*>/isU", '', $string);
- $string = preg_replace("/<script[^>]*>.+<\/script[^>]*>/isU", '', $string);
- $string = preg_replace("/<style[^>]*>.+<\/style[^>]*>/isU", '', $string);
- $string = str_replace('>', '> ', $string);
- $string = str_replace('<', ' <', $string);
- $string = strip_tags($string);
- $string = preg_replace("/\s+/", " ", $string);
- $string = trim($string);
- return $string;
-}
-
-/**
- * NOTE: Deprecated since 4.0, use i18n::hen()
- *
- * Make a string containing HTML safe for use in a HTML attribute
- * Tags are stripped and entities are normalized
- */
-function stringToAttribute ($string)
-{
- return i18n::hsc($string);
-}
-
-/**
- * NOTE: Deprecated since 4.0, use i18n::hsc()
- *
- * Make a string containing HTML safe for use in a XML document
- * Tags are stripped, entities are normalized and named entities are
- * converted to numeric entities.
- */
-function stringToXML ($string)
-{
- return i18n::hen($string);
-}
-
-// START: functions from the end of file BLOG.php
-// used for mail notification (html -> text)
-function toAscii($html) {
- // strip off most tags
- $html = strip_tags($html,'<a>');
- $to_replace = "/<a[^>]*href=[\"\']([^\"^']*)[\"\'][^>]*>([^<]*)<\/a>/i";
- _links_init();
- $ascii = preg_replace_callback ($to_replace, '_links_add', $html);
- $ascii .= "\n\n" . _links_list();
- return strip_tags($ascii);
-}
-
-function _links_init() {
- global $tmp_links;
- $tmp_links = array();
-}
-
-function _links_add($match) {
- global $tmp_links;
- array_push($tmp_links, $match[1]);
- return $match[2] . ' [' . sizeof($tmp_links) .']';
-}
-
-function _links_list() {
- global $tmp_links;
- $output = '';
- $i = 1;
- foreach ($tmp_links as $current) {
- $output .= "[$i] $current\n";
- $i++;
- }
- return $output;
-}
-// END: functions from the end of file BLOG.php
-
-// START: functions from the end of file ADMIN.php
-/**
*
* replace html entities for plugin description, but available for the other strings
- * NOTE: we can use i18n::hen() or i18n::hsc() alternatively and this is deprecated.
+ * NOTE: we can use ENTITY::hen() or ENTITY::hsc() alternatively and this is deprecated.
* @param string $data target string
* @return string
*/
function encode_desc($data)
{
- return i18n::hen($data);
+ return ENTITY::hen($data);
}
/*
return preg_replace("/[^a-z0-9-]/","_",$str).$ext;
}
-?>
\ No newline at end of file
+/**
+ * Centralisation of the functions to send mail
+ * Deprecated since 4.0:
+ * Please use functions in NOTIFICATION class instead
+ */
+function getMailFooter()
+{
+ NOTIFICATION::get_mail_footer();
+}
+function isValidMailAddress($address)
+{
+ return NOTIFICATION::address_validation($address);
+}
+/**
+ * Centralisation of the functions that deals XML entities
+ * Deprecated since 4.0:
+ * Please use ENTITY::FunctionName(...) instead
+ */
+function highlight($text, $expression, $highlight)
+{
+ return ENTITY::highlight($text, $expression, $highlight);
+}
+function shorten($string, $maxlength, $suffix)
+{
+ return ENTITY::shorten($string, $maxlength, $suffix);
+}
+function stringStripTags ($string)
+{
+ return ENTITY::strip_tags($string);
+}
+function toAscii($string)
+{
+ return ENTITY::anchor_footnoting($string);
+}
+function stringToAttribute ($string)
+{
+ return ENTITY::hsc($string);
+}
+function stringToXML ($string)
+{
+ return ENTITY::hen($string);
+}
+
+/**
+ * Centralisation of the functions that deals with locales
+ * This functions is based on the old way to deal with languages
+ * Deprecated since 4.0:
+ */
+/* NOTE: use i18n::get_current_locale() directly instead of this */
+function getLanguageName()
+{
+ if( ($language = i18n::convert_locale_to_old_language_file_name(i18n::get_current_locale())) === FALSE )
+ {
+ $language ='english';
+ }
+ return $language;
+}
+
+/* NOTE: use i18n::get_available_locales() directly instead of this */
+function checkLanguage($lang)
+{
+ return ( preg_match('#^(.+)_(.+)_(.+)$#', $lang)
+ || i18n::convert_old_language_file_name_to_locale($lang) );
+}
+/* NOTE: use i18n::formatted_datetime() directly instead of this */
+function formatDate($format, $timestamp, $default_format, &$blog)
+{
+ if ( !$blog )
+ {
+ $offset = date('Z', $timestamp);
+ }
+ else
+ {
+ $offset = date('Z', $timestamp) + $blog->getTimeOffset() * 3600;
+ }
+ return i18n::formatted_datetime($format, $timestamp, $default_format, $offset);
+}
+
+/**
+ * Centralisation of the functions that generate links
+ * Deprecated since 4.0:
+ * Please use Link::FunctionName(...) instead
+ */
+function createItemLink($itemid, $extra = '') {
+ return Link::createItemLink($itemid, $extra);
+}
+
+function createMemberLink($memberid, $extra = '') {
+ return Link::createMemberLink($memberid, $extra);
+}
+
+function createCategoryLink($catid, $extra = '') {
+ return Link::createCategoryLink($catid, $extra);
+}
+
+function createArchiveListLink($blogid = '', $extra = '') {
+ return Link::createArchiveListLink($blogid, $extra);
+}
+
+function createArchiveLink($blogid, $archive, $extra = '') {
+ return Link::createArchiveLink($blogid, $archive, $extra);
+}
+
+function createBlogidLink($blogid, $params = '') {
+ return Link::createBlogidLink($blogid, $params = '');
+}
+
+function createLink($type, $params) {
+ return Link::createLink($type, $params);
+}
+
+function createBlogLink($url, $params) {
+ return Link::createBlogLink($url, $params);
+}
\ No newline at end of file
* Initializing i18n class
*
* @static
- * @access public
* @param string $charset character set
* @return boolean
*/
* return available locale list with current charset
*
* @static
- * @access public
* @param void
* @return array available locale list
*/
* return current charset
*
* @static
- * @access public
* @param void
* @return string $charset current character set
*/
* @see 2. The Language Tag
*
* @static
- * @access public
* @param string $locale
* @return bool TRUE/FALSE
*
* Get current locale
*
* @static
- * @access public
* @param void
* @return $locale
*/
* http://www.php.net/manual/en/function.date-default-timezone-set.php
*
* @static
- * @access public
* @param void
* @return void
*/
* get current timezone
*
* @static
- * @access public
* @param void
* @return $timezone
*/
}
/**
- * i18n::hen
- * htmlentities wrapper
- *
- * @static
- * @access public
- * @param string $string target string
- * @param string $quotation quotation mode. please refer to the argument of PHP built-in htmlentities
- * @return string escaped string
- */
- static public function hen($string, $quotation=ENT_QUOTES)
- {
- $string = html_entity_decode($string, $quotation, self::$charset);
- return (string) htmlentities($string, $quotation, self::$charset);
- }
-
- /**
- * i18n::hsc
- * htmlspecialchars wrapper
- *
- * NOTE: htmlspecialchars_decode() is ASCII-to-ACII conversion
- * and its target string consists of several letters.
- * There are no problems.
- *
- * @static
- * @access public
- * @param string $string target string
- * @param string $quotation quotation mode. please refer to the argument of PHP built-in htmlspecialchars
- * @return string escaped string
- *
- */
-
- static public function hsc($string, $quotation=ENT_QUOTES)
- {
- $string = htmlspecialchars_decode($string, $quotation);
- return (string) htmlspecialchars($string, $quotation, self::$charset);
- }
-
- /**
* i18n::convert
* character set converter
*
* @static
- * @access public
* @param string $string target string binary
* @param string $from original character set encoding
* @param string $to target character set encoding
* strlen wrapper
*
* @static
- * @access public
* @param string $string target string
* @return integer the number of letters
*/
* strpos wrapper
*
* @static
- * @access public
* @param string $haystack string to search
* @param string $needle string for search
* @param string $offset the position from which the search should be performed.
* strrpos wrapper
*
* @static
- * @access public
* @param string $haystack string to search
* @param string $needle string for search
* @return integer/FALSE the numeric position of the last occurrence of needle in haystack
* substr wrapper
*
* @static
- * @access public
* @param string $string string to be cut
* @param string $start the position of starting
* @param integer $length the length to be cut
* http://www.php.net/manual/en/function.preg-split.php
*
* @static
- * @access public
* @param string $delimiter singlebyte or multibyte delimiter
* @param string $target target string
* @param integer $limit the number of index for returned array
* strftime function based on multibyte processing
*
* @static
- * @access public
* @param string $format format with singlebyte or multibyte
* @param timestamp $timestamp UNIX timestamp
* @return string formatted timestamp
return $format;
}
- $format = trim(preg_replace('#(%[^%])#', ',$1,', $format), ',');
- $elements = preg_split('#,#', $format);
+ $format = trim(preg_replace('#(%[^%])#', ',$1,', $format), ',');
+ $elements = preg_split('#,#', $format);
foreach ( $elements as $element )
{
}
/**
+ * i18n::formatted_datetime()
+ * return formatted datetime string
+ *
+ * Date and Time Formats
+ * @link http://www.w3.org/TR/NOTE-datetime
+ *
+ * Working with Time Zones
+ * @link http://www.w3.org/TR/timezone/
+ *
+ * @param String $format timezone format
+ * @param String $timestamp UNIX timestamp
+ * @param String $default_format default timezone format
+ * @param Integer $offset timestamp offset
+ * @return String formatted datetime
+ */
+ static public function formatted_datetime($format, $timestamp, $default_format, $offset)
+ {
+ $suffix = '';
+ $string = '';
+
+ switch ( $format )
+ {
+ case 'rfc822':
+ $format = 'D, j M Y H:i:s ';
+ if ( $offset < 0 )
+ {
+ $suffix = '-';
+ $offset = -$offset;
+ }
+ else
+ {
+ $suffix = '+';
+ }
+
+ $suffix .= sprintf("%02d%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
+ break;
+ case 'rfc822GMT':
+ $format = 'D, j M Y H:i:s ';
+ $timestamp -= $offset;
+ $suffix = 'GMT';
+ break;
+ case 'utc':
+ $timestamp -= $offset;
+ $format = 'Y-m-d\TH:i:s\Z';
+ $suffix = '';
+ break;
+ case 'iso8601':
+ $format = 'Y-m-d\TH:i:s';
+ if ( $offset < 0 )
+ {
+ $suffix = '-';
+ $offset = -$offset;
+ }
+ else
+ {
+ $suffix = '+';
+ }
+ $suffix .= sprintf("%02d:%02d", floor($offset / 3600), round(($offset % 3600) / 60) );
+ break;
+ case '':
+ $format = $default_format;
+ $suffix = '';
+ break;
+ default:
+ $suffix = 0;
+ break;
+ }
+ return i18n::strftime($format, $timestamp) . $suffix;
+ }
+
+ /**
* i18n::convert_locale_to_old_language_file_name()
* NOTE: this should be obsoleted near future.
*
* @static
- * @access public
* @param string $target_locale locale name as language_script_region
* @return string old language file name
*/
* NOTE: this should be obsoleted near future.
*
* @static
- * @access public
* @param string $target_language old language file name
* @return string locale name as language_script_region
*/
* NOTE: this should be obsoleted as soon as possible.
*
* @static
- * @access private
*/
static private $lang_refs = array(
"english" => "en_Latn_US",
case 'BODY':
$current = $template['current'];
- echo '<option value="' . i18n::hsc($current->value) . '"';
+ echo '<option value="' . ENTITY::hsc($current->value) . '"';
if ( $template['selected'] == $current->value )
{
echo ' selected="selected" ';
}
if ( isset($template['shorten']) && $template['shorten'] > 0 )
{
- echo ' title="'. i18n::hsc($current->text).'"';
- $current->text = i18n::hsc(shorten($current->text, $template['shorten'], $template['shortenel']));
+ echo ' title="'. ENTITY::hsc($current->text).'"';
+ $current->text = ENTITY::hsc(shorten($current->text, $template['shorten'], $template['shortenel']));
}
- echo '>' . i18n::hsc($current->text) . "</option>\n";
+ echo '>' . ENTITY::hsc($current->text) . "</option>\n";
break;
case 'FOOT':
echo '</select>';
$id = listplug_nextBatchId();
echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->mnumber}\" />\n";
echo "<label for=\"batch{$id}\">\n";
- echo '<a href="mailto:' . i18n::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->mname), "</a>\n";
+ echo '<a href="mailto:' . ENTITY::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->mname), "</a>\n";
echo "</label>\n";
echo "</td>";
- echo "<td>" . i18n::hsc($current->mrealname) . "</td>\n";
- echo '<td><a href="' . i18n::hsc($current->murl) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->murl) . "</a></td>\n";
+ echo "<td>" . ENTITY::hsc($current->mrealname) . "</td>\n";
+ echo '<td><a href="' . ENTITY::hsc($current->murl) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->murl) . "</a></td>\n";
echo '<td>' . ($current->madmin ? _YES : _NO) . "</td>\n";
echo '<td>' . ($current->mcanlogin ? _YES : _NO) . "</td>\n";
echo '<td><a href="index.php?action=memberedit&memberid=$current->mnumber" tabindex="' . $template['tabindex'] . '">' . _LISTS_EDIT . "</a></td>\n";
$id = listplug_nextBatchId();
echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->tmember}\" />\n";
echo '<label for="batch',$id,'">';
- echo '<a href="mailto:' . i18n::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . i18n::hsc($current->mname), "</a>\n";
+ echo '<a href="mailto:' . ENTITY::hsc($current->memail) . '" tabindex="' . $template['tabindex'] . '">' . ENTITY::hsc($current->mname), "</a>\n";
echo "</label>\n";
echo "</td>";
- echo '<td>', i18n::hsc($current->mrealname), "</td>\n";
+ echo '<td>', ENTITY::hsc($current->mrealname), "</td>\n";
echo '<td>', ($current->tadmin ? _YES : _NO) , "</td>\n";
echo "<td><a href=\"index.php?action=teamdelete&memberid=$current->tmember&blogid={$current->tblog}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_DELETE . "</a></td>\n";
$url = "index.php?action=teamchangeadmin&memberid={$current->tmember}&blogid={$current->tblog}";
$url = $manager->addTicketToUrl($url);
- echo '<td><a href="' . i18n::hsc($url) . '" tabindex="' . $template['tabindex'] . '">' . _LIST_TEAM_CHADMIN . "</a></td>\n";
+ echo '<td><a href="' . ENTITY::hsc($url) . '" tabindex="' . $template['tabindex'] . '">' . _LIST_TEAM_CHADMIN . "</a></td>\n";
break;
}
return;
if ( $plug )
{
echo "<td>\n";
- echo '<h3>' . i18n::hsc($plug->getName()) . "</h3>\n";
+ echo '<h3>' . ENTITY::hsc($plug->getName()) . "</h3>\n";
echo "<dl>\n";
if ( $plug->getAuthor() )
{
echo '<dt>' . _LIST_PLUGS_AUTHOR . "</dt>\n";
- echo '<dd>' . i18n::hsc($plug->getAuthor()) , "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($plug->getAuthor()) , "</dd>\n";
}
if ( $plug->getVersion() )
{
echo '<dt>' . _LIST_PLUGS_VER, "</dt>\n";
- echo '<dd>' . i18n::hsc($plug->getVersion()) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($plug->getVersion()) . "</dd>\n";
}
if ( $plug->getURL() )
{
echo '<dt>' . _LIST_PLUGS_SITE . "<dt>\n";
- echo '<dd><a href="' . i18n::hsc($plug->getURL()) . '" tabindex="' . $template['tabindex'] . '">リンク</a></dd>' . "\n";
+ echo '<dd><a href="' . ENTITY::hsc($plug->getURL()) . '" tabindex="' . $template['tabindex'] . '">リンク</a></dd>' . "\n";
}
echo "</dl>\n";
echo "</td>\n";
echo "<td>\n";
echo "<dl>\n";
echo '<dt>' . _LIST_PLUGS_DESC ."</dt>\n";
- echo '<dd>' . i18n::hen($plug->getDescription()) ."</dd>\n";
+ echo '<dd>' . ENTITY::hen($plug->getDescription()) ."</dd>\n";
if ( sizeof($plug->getEventList()) > 0 )
{
echo '<dt>' . _LIST_PLUGS_SUBS ."</dt>\n";
- echo '<dd>' . i18n::hsc(implode(', ', $plug->getEventList())) ."</dd>\n";
+ echo '<dd>' . ENTITY::hsc(implode(', ', $plug->getEventList())) ."</dd>\n";
}
if ( sizeof($plug->getPluginDep()) > 0 )
{
echo '<dt>' . _LIST_PLUGS_DEP ."</dt>\n";
- echo '<dd>' . i18n::hsc(implode(', ', $plug->getPluginDep())) ."</dd>\n";
+ echo '<dd>' . ENTITY::hsc(implode(', ', $plug->getPluginDep())) ."</dd>\n";
}
/* check dependency */
if ( count($req) > 0 )
{
echo '<dt>' . _LIST_PLUGS_DEPREQ . "</dt>\n";
- echo '<dd>' . i18n::hsc(implode(', ', $req)) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc(implode(', ', $req)) . "</dd>\n";
}
/* check the database to see if it is up-to-date and notice the user if not */
}
else
{
- echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, i18n::hsc($current->pfile)) . "</td>\n";
+ echo '<td colspan="2">' . sprintf(_PLUGINFILE_COULDNT_BELOADED, ENTITY::hsc($current->pfile)) . "</td>\n";
}
echo "<td>\n";
echo "<ul>\n";
$current->pid = (integer) $current->pid;
- $url = i18n::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=pluginup"));
+ $url = ENTITY::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=pluginup"));
echo "<li><a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" , _LIST_PLUGS_UP , "</a></li>\n";
- $url = i18n::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=plugindown"));
+ $url = ENTITY::hsc($manager->addTicketToUrl("index.php?plugid={$current->pid}&action=plugindown"));
echo "<li><a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" . _LIST_PLUGS_DOWN , "</a></li>\n";
echo "<li><a href=\"index.php?action=plugindelete&plugid={$current->pid}\" tabindex=\"{$template['tabindex']}\">" . _LIST_PLUGS_UNINSTALL , "</a></li>\n";
if ( $plug && ($plug->hasAdminArea() > 0) )
{
- echo '<li><a href="' , i18n::hsc($plug->getAdminURL()) , '" tabindex="' , $template['tabindex'] , '">' , _LIST_PLUGS_ADMIN , "</a></li>\n";
+ echo '<li><a href="' , ENTITY::hsc($plug->getAdminURL()) , '" tabindex="' , $template['tabindex'] , '">' , _LIST_PLUGS_ADMIN , "</a></li>\n";
}
if ( $plug && ($plug->supportsFeature('HelpPage') > 0) )
if ( !$current['description'] )
{
- echo '<td>' , i18n::hsc($current['name']) . "</td>\n";
+ echo '<td>' , ENTITY::hsc($current['name']) . "</td>\n";
}
else
{
if ( !defined($current['description']) )
{
- echo '<td>' , i18n::hsc($current['description']) . "</td>\n";
+ echo '<td>' , ENTITY::hsc($current['description']) . "</td>\n";
}
else
{
- echo '<td>' , i18n::hsc(constant($current['description'])) . "</td>\n";
+ echo '<td>' , ENTITY::hsc(constant($current['description'])) . "</td>\n";
}
}
echo "<td>\n";
ADMIN::input_yesno($varname, $current['value'], 0, 'yes', 'no');
break;
case 'password':
- echo '<input type="password" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),"\" />\n";
+ echo '<input type="password" size="40" maxlength="128" name="',ENTITY::hsc($varname),'" value="',ENTITY::hsc($current['value']),"\" />\n";
break;
case 'select':
- echo '<select name="'.i18n::hsc($varname)."\">\n";
+ echo '<select name="'.ENTITY::hsc($varname)."\">\n";
$options = NucleusPlugin::getOptionSelectValues($current['typeinfo']);
$options = i18n::explode('|', $options);
{
if ($options[$i+1] == $current['value'])
{
- echo '<option value="' . i18n::hsc($options[$i+1]) . '" selected="selected">';
+ echo '<option value="' . ENTITY::hsc($options[$i+1]) . '" selected="selected">';
}
else
{
- echo '<option value="' . i18n::hsc($options[$i+1]) . '">';
+ echo '<option value="' . ENTITY::hsc($options[$i+1]) . '">';
}
if ( defined($options[$i]) )
{
- echo i18n::hsc(constant($options[$i]));
+ echo ENTITY::hsc(constant($options[$i]));
}
else
{
- echo i18n::hsc($options[$i]);
+ echo ENTITY::hsc($options[$i]);
}
echo "</option>\n";
}
//$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
if ( array_key_exists('access', $meta) && $meta['access'] == 'readonly' )
{
- echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\" readonly=\"readonly\">\n";
+ echo '<textarea class="pluginoption" cols="30" rows="5" name="' . ENTITY::hsc($varname) . "\" readonly=\"readonly\">\n";
}
else
{
- echo '<textarea class="pluginoption" cols="30" rows="5" name="' . i18n::hsc($varname) . "\">\n";
+ echo '<textarea class="pluginoption" cols="30" rows="5" name="' . ENTITY::hsc($varname) . "\">\n";
}
- echo i18n::hsc($current['value']) . "\n";
+ echo ENTITY::hsc($current['value']) . "\n";
echo "</textarea>\n";
break;
case 'text':
default:
//$meta = NucleusPlugin::getOptionMeta($current['typeinfo']);
- echo '<input type="text" size="40" maxlength="128" name="',i18n::hsc($varname),'" value="',i18n::hsc($current['value']),'"';
+ echo '<input type="text" size="40" maxlength="128" name="',ENTITY::hsc($varname),'" value="',ENTITY::hsc($current['value']),'"';
if ( array_key_exists('datatype', $meta) && $meta['datatype'] == 'numerical' )
{
echo ' onkeyup="checkNumeric(this)" onblur="checkNumeric(this)"';
echo "<td{$cssclass}>\n";
echo "<dl>\n";
echo '<dt>' . _LIST_ITEM_BLOG . "</dt>\n";
- echo '<dd>' . i18n::hsc($current->bshortname) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($current->bshortname) . "</dd>\n";
echo '<dt>' . _LIST_ITEM_CAT . "</dt>\n";
- echo '<dd>' . i18n::hsc($current->cname) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($current->cname) . "</dd>\n";
echo '<dt>' . _LIST_ITEM_AUTHOR . "</dt>\n";
- echo '<dd>' . i18n::hsc($current->mname) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($current->mname) . "</dd>\n";
echo '<dt>' . _LIST_ITEM_DATE . "</dt>\n";
echo '<dd>' . date("Y-m-d",$current->itime) . "</dd>\n";
echo '<dt>' . _LIST_ITEM_TIME . "</dt>\n";
echo "<td{$cssclass}>\n";
echo "<h3>\n";
echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->inumber}\" />\n";
- echo "<label for=\"batch{$id}\">" . i18n::hsc(strip_tags($current->ititle)) . "</label>\n";
+ echo "<label for=\"batch{$id}\">" . ENTITY::hsc(strip_tags($current->ititle)) . "</label>\n";
echo "</h3>\n";
$current->ibody = strip_tags($current->ibody);
- $current->ibody = i18n::hsc(shorten($current->ibody, 300, '...'));
+ $current->ibody = ENTITY::hsc(shorten($current->ibody, 300, '...'));
echo "<p>$current->ibody</p>\n";
echo "</td>\n";
echo '<li>' . date("Y-m-d@H:i",$current->ctime) . "</li>\n";
if ( isset($current->mname) )
{
- echo '<li>' . i18n::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER . "</li>\n";
+ echo '<li>' . ENTITY::hsc($current->mname) ,' ', _LIST_COMMENTS_MEMBER . "</li>\n";
}
else
{
- echo '<li>' . i18n::hsc($current->cuser) . "</li>\n";
+ echo '<li>' . ENTITY::hsc($current->cuser) . "</li>\n";
}
if ( isset($current->cmail) && $current->cmail )
{
- echo '<li>' . i18n::hsc($current->cmail) . "</li>\n";
+ echo '<li>' . ENTITY::hsc($current->cmail) . "</li>\n";
}
if ( isset($current->cemail) && $current->cemail )
{
- echo '<li>' . i18n::hsc($current->cemail) . "</li>\n";
+ echo '<li>' . ENTITY::hsc($current->cemail) . "</li>\n";
}
echo "</ul>\n";
echo "</td>\n";
echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}\" value=\"{$current->cnumber}\" />\n";
echo "<label for=\"batch{$id}\">\n";
$current->cbody = strip_tags($current->cbody);
- $current->cbody = i18n::hsc(shorten($current->cbody, 300, '...'));
+ $current->cbody = ENTITY::hsc(shorten($current->cbody, 300, '...'));
echo $current->cbody;
echo '</label>';
echo '</td>';
echo '<td><a href="index.php?action=commentdelete&commentid=' . $current->cnumber . '">' . _LISTS_DELETE . "</a></td>\n";
if ( $template['canAddBan'] )
{
- echo '<td><a href="index.php?action=banlistnewfromitem&itemid=' . $current->citem . '&ip=' . i18n::hsc($current->cip), '" title="' . i18n::hsc($current->chost) . '">' . _LIST_COMMENT_BANIP . "</a></td>\n";
+ echo '<td><a href="index.php?action=banlistnewfromitem&itemid=' . $current->citem . '&ip=' . ENTITY::hsc($current->cip), '" title="' . ENTITY::hsc($current->chost) . '">' . _LIST_COMMENT_BANIP . "</a></td>\n";
}
break;
}
break;
case 'BODY':
$current = $template['current'];
- $current->bname = i18n::hsc($current->bname);
+ $current->bname = ENTITY::hsc($current->bname);
echo "<td title=\"blogid:{$current->bnumber} shortname:{$current->bshortname}\"><a href=\"{$current->burl}\"><img src=\"images/globe.gif\" width=\"13\" height=\"13\" alt=\"". _BLOGLIST_TT_VISIT."\" /></a>{$current->bname}</td>\n";
echo "<td><a href=\"index.php?action=createitem&blogid={$current->bnumber}\" title=\"" . _BLOGLIST_TT_ADD ."\">" . _BLOGLIST_ADD . "</a></td>\n";
break;
case 'BODY':
$current = $template['current'];
- $current->bshortname = i18n::hsc($current->bshortname);
- $current->bname = i18n::hsc($current->bname);
+ $current->bshortname = ENTITY::hsc($current->bshortname);
+ $current->bname = ENTITY::hsc($current->bname);
echo "<td>{$current->bshortname}</td>\n";
echo "<td>{$current->bname}</td>\n";
break;
case 'BODY':
$current = $template['current'];
- $current->name = i18n::hsc($current->name);
- $current->description = i18n::hsc($current->description);
+ $current->name = ENTITY::hsc($current->name);
+ $current->description = ENTITY::hsc($current->description);
echo "<td>{$current->name}</td>\n";
echo "<td>{$current->description}</td>\n";
$id = listplug_nextBatchId();
$current = $template['current'];
- $current->cname = i18n::hsc($current->cname);
- $current->cdesc = i18n::hsc($current->cdesc);
+ $current->cname = ENTITY::hsc($current->cname);
+ $current->cdesc = ENTITY::hsc($current->cdesc);
echo "<td>\n";
echo "<input type=\"checkbox\" id=\"batch{$id}\" name=\"batch[{$id}]\" value=\"{$current->catid}\" />\n";
case 'BODY':
$current = $template['current'];
$current->tdnumber = (integer) $current->tdnumber;
- $current->tdname = i18n::hsc($current->tdname);
- $current->tddesc = i18n::hsc($current->tddesc);
+ $current->tdname = ENTITY::hsc($current->tdname);
+ $current->tddesc = ENTITY::hsc($current->tddesc);
$url = "index.php?action=templateclone&templateid={$current->tdnumber}";
- $url = i18n::hsc($manager->addTicketToUrl($url));
+ $url = ENTITY::hsc($manager->addTicketToUrl($url));
echo "<td>{$current->tdname}</td>\n";
echo "<td>{$current->tddesc}</td>\n";
case 'BODY':
$current = $template['current'];
$current->sdnumber = (integer) $current->sdnumber;
- $current->sdname = i18n::hsc($current->sdname);
- $current->sdtype = i18n::hsc($current->sdtype);
+ $current->sdname = ENTITY::hsc($current->sdname);
+ $current->sdtype = ENTITY::hsc($current->sdtype);
echo "<td>\n";
if ( $current->sdincpref )
{
echo '<dt>' . _LIST_SKINS_INCPREFIX . "</dt>\n";
- echo '<dd>' . i18n::hsc($current->sdincpref) . "</dd>\n";
+ echo '<dd>' . ENTITY::hsc($current->sdincpref) . "</dd>\n";
}
echo "</dl>\n";
$has_enlargement = @file_exists($DIR_SKINS . $current->sdincpref . 'preview-large.png');
if ( $has_enlargement )
{
- echo '<a href="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . "\">\n";
- echo '<img class="skinpreview" src="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" />\n";
+ echo '<a href="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview-large.png" title="' . _LIST_SKIN_PREVIEW_VIEWLARGER . "\">\n";
+ echo '<img class="skinpreview" src="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" />\n";
echo "</a><br />\n";
}
else
{
- echo '<img class="skinpreview" src="',$CONF['SkinsURL'], i18n::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" /><br />\n";
+ echo '<img class="skinpreview" src="',$CONF['SkinsURL'], ENTITY::hsc($current->sdincpref),'preview.png" width="100" height="75" alt="' . $alternatve_text . "\" /><br />\n";
}
if ( @file_exists("{$DIR_SKINS}{$current->sdincpref}readme.html") )
{
- $url = $CONF['SkinsURL'] . i18n::hsc($current->sdincpref) . 'readme.html';
+ $url = $CONF['SkinsURL'] . ENTITY::hsc($current->sdincpref) . 'readme.html';
$title = sprintf(_LIST_SKIN_README, $current->sdname);
echo "<a href=\"{$url}\" title=\"{$title}\">" . _LIST_SKIN_README_TXT . "</a>\n";
}
echo "</td>\n";
echo "<td>\n";
- echo '<p>' . i18n::hsc($current->sddesc) . "</p>\n";
+ echo '<p>' . ENTITY::hsc($current->sddesc) . "</p>\n";
/* show list of defined parts */
$query = "SELECT stype FROM %s WHERE sdesc=%d ORDER BY stype";
}
$types[$i] = "<li>\n";
$types[$i] .= helpHtml($article) . "\n";
- $types[$i] .= "<a href=\"index.php?action=skinedittype&skinid={$current->sdnumber}&type={$type}\" tabindex=\"{$template['tabindex']}\">" . i18n::hsc($friendlyNames[$type]) . "</a>\n";
+ $types[$i] .= "<a href=\"index.php?action=skinedittype&skinid={$current->sdnumber}&type={$type}\" tabindex=\"{$template['tabindex']}\">" . ENTITY::hsc($friendlyNames[$type]) . "</a>\n";
$types[$i] .= "</li>\n";
}
echo _LIST_SKINS_DEFINED;
echo "</td>\n";
$url = "index.php?action=skinclone&skinid={$current->sdnumber}";
- $url = i18n::hsc($manager->addTicketToUrl($url));
+ $url = ENTITY::hsc($manager->addTicketToUrl($url));
echo "<td>\n";
echo "<a href=\"{$url}\" tabindex=\"{$template['tabindex']}\">" . _LISTS_CLONE . "</a>\n";
echo "</td>\n";
break;
case 'BODY':
$current = $template['current'];
- $current->bshortname = i18n::hsc($current->bshortname);
- $current->ititle = i18n::hsc(strip_tags($current->ititle));
+ $current->bshortname = ENTITY::hsc($current->bshortname);
+ $current->ititle = ENTITY::hsc(strip_tags($current->ititle));
echo "<td>{$current->bshortname}</td>\n";
echo "<td>{$current->ititle}</td>\n";
break;
case 'BODY':
$current = $template['current'];
- $current->bshortname = i18n::hsc($current->bshortname);
- $current->ititle = i18n::hsc(strip_tags($current->ititle));
- $current->mname = i18n::hsc($current->mname);
+ $current->bshortname = ENTITY::hsc($current->bshortname);
+ $current->ititle = ENTITY::hsc(strip_tags($current->ititle));
+ $current->mname = ENTITY::hsc($current->mname);
echo "<td>{$current->bshortname}</td>\n";
echo "<td>{$current->ititle}</td>\n";
break;
case 'BODY':
$current = $template['current'];
- $current->timestamp = i18n::hsc($current->timestamp);
- $current->message = i18n::hsc($current->message);
+ $current->timestamp = ENTITY::hsc($current->timestamp);
+ $current->message = ENTITY::hsc($current->message);
echo "<td>{$current->timestamp}</td>\n";
echo "<td>{$current->message}</td>\n";
case 'BODY':
$current = $template['current'];
$current->blogid = (integer) $current->blogid;
- $current->iprange = i18n::hsc($current->iprange);
- $current->reason = i18n::hsc($current->reason);
+ $current->iprange = ENTITY::hsc($current->iprange);
+ $current->reason = ENTITY::hsc($current->reason);
echo "<td>{$current->iprange}</td>\n";
echo "<td>{$current->reason}</td>\n";
- echo "<td><a href=\"index.php?action=banlistdelete&blogid=\"{$current->blogid}&iprange=\"i18n::hsc($current->iprange}\">" . _LISTS_DELETE . "</a></td>\n";
+ echo "<td><a href=\"index.php?action=banlistdelete&blogid=\"{$current->blogid}&iprange=\"ENTITY::hsc($current->iprange}\">" . _LISTS_DELETE . "</a></td>\n";
break;
}
return;
$inames_error .= "<ul>";
foreach( $invalidSkinNames as $sName )
{
- $inames_error .= "<li>".i18n::hsc($sName)."</li>";
+ $inames_error .= "<li>".ENTITY::hsc($sName)."</li>";
}
foreach( $invalidTemplateNames as $sName )
{
- $inames_error .= "<li>".i18n::hsc($sName)."</li>";
+ $inames_error .= "<li>".ENTITY::hsc($sName)."</li>";
}
$inames_error .= "</ul>";
return $inames_error;
if ( $this->debug )
{
- echo 'START: ', i18n::hsc($name), '<br />';
+ echo 'START: ', ENTITY::hsc($name), '<br />';
}
switch ( $name )
$this->currentPartName = $attrs['name'];
break;
default:
- echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . i18n::hsc($name) . '<br />';
+ echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . ENTITY::hsc($name) . '<br />';
break;
}
// character data never contains other tags
{
if ( $this->debug )
{
- echo 'END: ' . i18n::hsc($name) . '<br />';
+ echo 'END: ' . ENTITY::hsc($name) . '<br />';
}
if ( $this->parse_charset != i18n::get_current_charset() )
}
break;
default:
- echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . i18n::hsc($name) . '<br />';
+ echo _SKINIE_SEELEMENT_UNEXPECTEDTAG . ENTITY::hsc($name) . '<br />';
break;
}
$this->clear_character_data();
{
if ( $this->debug )
{
- echo 'NEW DATA: ' . i18n::hsc($data) . '<br />';
+ echo 'NEW DATA: ' . ENTITY::hsc($data) . '<br />';
}
$this->cdata .= $data;
return;
// skins
foreach ( $this->skins as $skinId => $skinName )
{
- echo "\t\t" . '<skin name="' . i18n::hsc($skinName) . '" />' . "\n";
+ echo "\t\t" . '<skin name="' . ENTITY::hsc($skinName) . '" />' . "\n";
}
// templates
foreach ( $this->templates as $templateId => $templateName )
{
- echo "\t\t" . '<template name="' . i18n::hsc($templateName) . '" />' . "\n";
+ echo "\t\t" . '<template name="' . ENTITY::hsc($templateName) . '" />' . "\n";
}
// extra info
if ( $this->info )
$skinId = intval($skinId);
$skinObj = new SKIN($skinId);
- echo "\t" . '<skin name="' . i18n::hsc($skinName) . '" type="' . i18n::hsc($skinObj->getContentType()) . '" includeMode="' . i18n::hsc($skinObj->getIncludeMode()) . '" includePrefix="' . i18n::hsc($skinObj->getIncludePrefix()) . '">' . "\n";
- echo "\t\t<description>" . i18n::hsc($skinObj->getDescription()) . "</description>\n";
+ echo "\t" . '<skin name="' . ENTITY::hsc($skinName) . '" type="' . ENTITY::hsc($skinObj->getContentType()) . '" includeMode="' . ENTITY::hsc($skinObj->getIncludeMode()) . '" includePrefix="' . ENTITY::hsc($skinObj->getIncludePrefix()) . '">' . "\n";
+ echo "\t\t<description>" . ENTITY::hsc($skinObj->getDescription()) . "</description>\n";
$res = sql_query('SELECT stype, scontent FROM '. sql_table('skin') .' WHERE sdesc=' . $skinId);
while ( $partObj = sql_fetch_object($res) )
{
- echo "\t\t" . '<part name="',i18n::hsc($partObj->stype) . '">';
+ echo "\t\t" . '<part name="',ENTITY::hsc($partObj->stype) . '">';
echo '<![CDATA[' . $this->escapeCDATA($partObj->scontent) . ']]>';
echo "</part>\n\n";
}
{
$templateId = intval($templateId);
- echo "\t" . '<template name="' . i18n::hsc($templateName) . '">' . "\n";
- echo "\t\t<description>" . i18n::hsc(TEMPLATE::getDesc($templateId)) . "</description>\n";
+ echo "\t" . '<template name="' . ENTITY::hsc($templateName) . '">' . "\n";
+ echo "\t\t<description>" . ENTITY::hsc(TEMPLATE::getDesc($templateId)) . "</description>\n";
$res = sql_query('SELECT tpartname, tcontent FROM '. sql_table('template') .' WHERE tdesc=' . $templateId);
while ( $partObj = sql_fetch_object($res) )
{
- echo "\t\t" . '<part name="' . i18n::hsc($partObj->tpartname) . '">';
+ echo "\t\t" . '<part name="' . ENTITY::hsc($partObj->tpartname) . '">';
echo '<![CDATA[' . $this->escapeCDATA($partObj->tcontent) . ']]>';
echo "</part>\n\n";
}
{
?>
<html xmlns="http://www.w3.org/1999/xhtml">
- <head><title><?php echo i18n::hsc($title)?></title></head>
+ <head><title><?php echo ENTITY::hsc($title)?></title></head>
<body>
- <h1><?php echo i18n::hsc($title)?></h1>
+ <h1><?php echo ENTITY::hsc($title)?></h1>
<?php echo $msg?>
</body>
</html>
function startUpError($msg, $title) {
?>
<html xmlns="http://www.w3.org/1999/xhtml">
- <head><title><?php echo i18n::hsc($title)?></title></head>
+ <head><title><?php echo ENTITY::hsc($title)?></title></head>
<body>
- <h1><?php echo i18n::hsc($title)?></h1>
+ <h1><?php echo ENTITY::hsc($title)?></h1>
<?php echo $msg?>
</body>
</html>
if($this->debug > 1)
{
- print "<PRE>\n---SENDING---\n" . i18n::hen($op) . "\n---END---\n</PRE>";
+ print "<PRE>\n---SENDING---\n" . ENTITY::hen($op) . "\n---END---\n</PRE>";
// let the client see this now in case http times out...
flush();
}
if($this->debug > 1)
{
- print "<PRE>\n---SENDING---\n" . i18n::hen($payload) . "\n---END---\n</PRE>";
+ print "<PRE>\n---SENDING---\n" . ENTITY::hen($payload) . "\n---END---\n</PRE>";
// let the client see this now in case http times out...
flush();
}
// error response
$this->errno = $fcode;
$this->errstr = $fstr;
- //$this->errstr = i18n::hsc($fstr); // XXX: encoding probably shouldn't be done here; fix later.
+ //$this->errstr = ENTITY::hsc($fstr); // XXX: encoding probably shouldn't be done here; fix later.
}
else
{
print '<PRE>';
foreach($GLOBALS['_xh']['headers'] as $header => $value)
{
- print i18n::hen("HEADER: $header: $value\n");
+ print ENTITY::hen("HEADER: $header: $value\n");
}
foreach($GLOBALS['_xh']['cookies'] as $header => $value)
{
- print i18n::hen("COOKIE: $header={$value['value']}\n");
+ print ENTITY::hen("COOKIE: $header={$value['value']}\n");
}
print "</PRE>\n";
}
{
$data = $degzdata;
if($this->debug)
- print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . i18n::hen($data) . "\n---END---</PRE>";
+ print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . ENTITY::hen($data) . "\n---END---</PRE>";
}
elseif($GLOBALS['_xh']['headers']['content-encoding'] == 'gzip' && $degzdata = @gzinflate(i18n::substr($data, 10)))
{
$data = $degzdata;
if($this->debug)
- print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . i18n::hen($data) . "\n---END---</PRE>";
+ print "<PRE>---INFLATED RESPONSE---[".i18n::strlen($data)." chars]---\n" . ENTITY::hen($data) . "\n---END---</PRE>";
}
else
{
{
if($this->debug)
{
- print "<PRE>---GOT---\n" . i18n::hen($data) . "\n---END---\n</PRE>";
+ print "<PRE>---GOT---\n" . ENTITY::hen($data) . "\n---END---\n</PRE>";
}
if($data == '')
$start += i18n::strlen('<!-- SERVER DEBUG INFO (BASE64 ENCODED):');
$end = i18n::strpos($data, '-->', $start);
$comments = i18n::substr($data, $start, $end-$start);
- print "<PRE>---SERVER DEBUG INFO (DECODED) ---\n\t".i18n::hen(str_replace("\n", "\n\t", base64_decode($comments)))."\n---END---\n</PRE>";
+ print "<PRE>---SERVER DEBUG INFO (DECODED) ---\n\t".ENTITY::hen(str_replace("\n", "\n\t", base64_decode($comments)))."\n---END---\n</PRE>";
}
}
if ($this->debug)
{
print "<PRE>---PARSED---\n";
- print i18n::hsc(var_export($GLOBALS['_xh']['value'], true));
+ print ENTITY::hsc(var_export($GLOBALS['_xh']['value'], true));
print "\n---END---</PRE>";
}
if (sizeof($collections) > 1) {
?>
<form method="post" action="media.php"><div>
- <label for="media_collection"><?php echo i18n::hsc(_MEDIA_COLLECTION_LABEL)?></label>
+ <label for="media_collection"><?php echo ENTITY::hsc(_MEDIA_COLLECTION_LABEL)?></label>
<select name="collection" id="media_collection">
<?php foreach ($collections as $dirname => $description) {
- echo '<option value="',i18n::hsc($dirname),'"';
+ echo '<option value="',ENTITY::hsc($dirname),'"';
if ($dirname == $currentCollection) {
echo ' selected="selected"';
}
- echo '>',i18n::hsc($description),'</option>';
+ echo '>',ENTITY::hsc($description),'</option>';
}
?>
</select>
- <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_COLLECTION_SELECT) ?>" title="<?php echo i18n::hsc(_MEDIA_COLLECTION_TT)?>" />
- <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_UPLOAD_TO) ?>" title="<?php echo i18n::hsc(_MEDIA_UPLOADLINK) ?>" />
+ <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_COLLECTION_SELECT) ?>" title="<?php echo ENTITY::hsc(_MEDIA_COLLECTION_TT)?>" />
+ <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_UPLOAD_TO) ?>" title="<?php echo ENTITY::hsc(_MEDIA_UPLOADLINK) ?>" />
<?php $manager->addTicketHidden() ?>
</div></form>
<?php } else {
?>
<form method="post" action="media.php" style="float:right"><div>
- <input type="hidden" name="collection" value="<?php echo i18n::hsc($currentCollection)?>" />
- <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_UPLOAD_NEW) ?>" title="<?php echo i18n::hsc(_MEDIA_UPLOADLINK) ?>" />
+ <input type="hidden" name="collection" value="<?php echo ENTITY::hsc($currentCollection)?>" />
+ <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_UPLOAD_NEW) ?>" title="<?php echo ENTITY::hsc(_MEDIA_UPLOADLINK) ?>" />
<?php $manager->addTicketHidden() ?>
</div></form>
<?php } // if sizeof
?>
<form method="post" action="media.php"><div>
- <label for="media_filter"><?php echo i18n::hsc(_MEDIA_FILTER_LABEL)?></label>
- <input id="media_filter" type="text" name="filter" value="<?php echo i18n::hsc($filter)?>" />
- <input type="submit" name="action" value="<?php echo i18n::hsc(_MEDIA_FILTER_APPLY) ?>" />
- <input type="hidden" name="collection" value="<?php echo i18n::hsc($currentCollection)?>" />
+ <label for="media_filter"><?php echo ENTITY::hsc(_MEDIA_FILTER_LABEL)?></label>
+ <input id="media_filter" type="text" name="filter" value="<?php echo ENTITY::hsc($filter)?>" />
+ <input type="submit" name="action" value="<?php echo ENTITY::hsc(_MEDIA_FILTER_APPLY) ?>" />
+ <input type="hidden" name="collection" value="<?php echo ENTITY::hsc($currentCollection)?>" />
<input type="hidden" name="offset" value="<?php echo intval($offset)?>" />
</div></form>
?>
<table width="100%">
- <caption><?php echo _MEDIA_COLLECTION_LABEL . i18n::hsc($collections[$currentCollection])?></caption>
+ <caption><?php echo _MEDIA_COLLECTION_LABEL . ENTITY::hsc($collections[$currentCollection])?></caption>
<tr>
<th><?php echo _MEDIA_MODIFIED?></th><th><?php echo _MEDIA_FILENAME?></th><th><?php echo _MEDIA_DIMENSIONS?></th>
</tr>
if ($filetype != 0) {
// image (gif/jpg/png/swf)
- echo "<td><a href=\"media.php\" onclick=\"chooseImage('", i18n::hsc($jsCurrentCollection), "','", i18n::hsc($jsFileName), "',"
- . "'", i18n::hsc($width), "','" , i18n::hsc($height), "'"
- . ")\" title=\"" . i18n::hsc($obj->filename). "\">"
- . i18n::hsc(shorten($obj->filename,25,'...'))
+ echo "<td><a href=\"media.php\" onclick=\"chooseImage('", ENTITY::hsc($jsCurrentCollection), "','", ENTITY::hsc($jsFileName), "',"
+ . "'", ENTITY::hsc($width), "','" , ENTITY::hsc($height), "'"
+ . ")\" title=\"" . ENTITY::hsc($obj->filename). "\">"
+ . ENTITY::hsc(shorten($obj->filename,25,'...'))
."</a>";
- echo ' (<a href="', i18n::hsc($CONF['MediaURL'] . $currentCollection . '/' . $obj->filename), '" onclick="window.open(this.href); return false;" title="',i18n::hsc(_MEDIA_VIEW_TT),'">',_MEDIA_VIEW,'</a>)';
+ echo ' (<a href="', ENTITY::hsc($CONF['MediaURL'] . $currentCollection . '/' . $obj->filename), '" onclick="window.open(this.href); return false;" title="',ENTITY::hsc(_MEDIA_VIEW_TT),'">',_MEDIA_VIEW,'</a>)';
echo "</td>";
} else {
// no image (e.g. mpg)
- echo "<td><a href='media.php' onclick=\"chooseOther('" , i18n::hsc($jsCurrentCollection), "','", i18n::hsc($jsFileName), "'"
- . ")\" title=\"" . i18n::hsc($obj->filename). "\">"
- . i18n::hsc(shorten($obj->filename,30,'...'))
+ echo "<td><a href='media.php' onclick=\"chooseOther('" , ENTITY::hsc($jsCurrentCollection), "','", ENTITY::hsc($jsFileName), "'"
+ . ")\" title=\"" . ENTITY::hsc($obj->filename). "\">"
+ . ENTITY::hsc(shorten($obj->filename,30,'...'))
."</a></td>";
}
- echo '<td>' , i18n::hsc($width) , 'x' , i18n::hsc($height) , '</td>';
+ echo '<td>' , ENTITY::hsc($width) , 'x' , ENTITY::hsc($height) , '</td>';
echo '</tr>';
}
} // if (sizeof($arr)>0)
<br /><br /><label for="upload_collection">Collection:</label>
<br /><select name="collection" id="upload_collection">
<?php foreach ($collections as $dirname => $description) {
- echo '<option value="',i18n::hsc($dirname),'"';
+ echo '<option value="',ENTITY::hsc($dirname),'"';
if ($dirname == $currentCollection) {
echo ' selected="selected"';
}
- echo '>',i18n::hsc($description),'</option>';
+ echo '>',ENTITY::hsc($description),'</option>';
}
?>
</select>
<?php } else {
?>
- <input name="collection" type="hidden" value="<?php echo i18n::hsc(requestVar('collection'))?>" />
+ <input name="collection" type="hidden" value="<?php echo ENTITY::hsc(requestVar('collection'))?>" />
<?php } // if sizeof
?>
<br /><br />
<form method="post" action="media.php">
<div>
<input name="action" value="login" type="hidden" />
- <input name="collection" value="<?php echo i18n::hsc(requestVar('collection'))?>" type="hidden" />
+ <input name="collection" value="<?php echo ENTITY::hsc(requestVar('collection'))?>" type="hidden" />
<?php echo _LOGINFORM_NAME?>: <input name="login" />
<br /><?php echo _LOGINFORM_PWD?>: <input name="password" type="password" />
<br /><input type="submit" value="<?php echo _LOGIN?>" />
{
$data['success'] = 0;
$data['allowlocal'] = 0;
- $info = sprintf(_SECURITYENFORCER_LOGIN_DISALLOWED, i18n::hsc($login), i18n::hsc($ip));
+ $info = sprintf(_SECURITYENFORCER_LOGIN_DISALLOWED, ENTITY::hsc($login), ENTITY::hsc($ip));
ACTIONLOG::add(INFO, $info);
}
return;
while( $row = sql_fetch_assoc($result) )
{
echo '<tr>';
- echo '<td>'.i18n::hsc($row['login']).'</td>';
- echo '<td><input type="checkbox" name="unlock[]" value="'.i18n::hsc($row['login']).'" />'._SECURITYENFORCER_UNLOCK.'</td>';
+ echo '<td>'.ENTITY::hsc($row['login']).'</td>';
+ echo '<td><input type="checkbox" name="unlock[]" value="'.ENTITY::hsc($row['login']).'" />'._SECURITYENFORCER_UNLOCK.'</td>';
echo '</tr>';
}
}
global $pluginUrl;
- $result = '<a href="' . i18n::hsc($pluginUrl) . '" title="Go back to «skins»">';
- $result .= '<img src="' . i18n::hsc($pluginUrl . 'home.gif') . '" alt="" /> skins</a> / ';
+ $result = '<a href="' . ENTITY::hsc($pluginUrl) . '" title="Go back to «skins»">';
+ $result .= '<img src="' . ENTITY::hsc($pluginUrl . 'home.gif') . '" alt="" /> skins</a> / ';
$parts = i18n::explode('/', $relative);
$part = '';
if ($v != '') {
$part .= $v . '/';
- $result .= '<a href="' . i18n::hsc($pluginUrl . '?dir=' . rawurlencode($part)) . '" ';
- $result .= 'title="Go back to «' . i18n::hsc($v) . '»">';
- $result .= '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="" /> ';
- $result .= i18n::hsc($v) . '</a> / ';
+ $result .= '<a href="' . ENTITY::hsc($pluginUrl . '?dir=' . rawurlencode($part)) . '" ';
+ $result .= 'title="Go back to «' . ENTITY::hsc($v) . '»">';
+ $result .= '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="" /> ';
+ $result .= ENTITY::hsc($v) . '</a> / ';
}
}
if (is_readable ($directory . $name))
{
- echo '<a href="' . i18n::hsc($pluginUrl . '?dir=' . rawurlencode($dir)) . '">';
- echo '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
- echo i18n::hsc($name).'</a>';
+ echo '<a href="' . ENTITY::hsc($pluginUrl . '?dir=' . rawurlencode($dir)) . '">';
+ echo '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
+ echo ENTITY::hsc($name).'</a>';
}
else
{
- echo '<img src="' . i18n::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
- echo i18n::hsc($name);
+ echo '<img src="' . ENTITY::hsc($pluginUrl . 'dir.gif') . '" alt="folder" /> ';
+ echo ENTITY::hsc($name);
}
echo '</td>';
if (is_writable($directory . $name)) {
- echo '<td><a href="' . i18n::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_RENAME . '</a></td>';
+ echo '<td><a href="' . ENTITY::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_RENAME . '</a></td>';
} else {
echo '<td> </td>';
}
if (is_writable($directory . $name) && sfDirectoryIsEmpty($directory . $name)) {
- echo '<td><a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_DELETE . '</a></td>';
+ echo '<td><a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_DELETE . '</a></td>';
} else {
echo '<td> </td>';
}
if (is_readable ($directory . $name) && sfAllowViewing($name))
{
- echo '<a href="' . i18n::hsc($viewUrl) . '">';
- echo '<img src="' . i18n::hsc(sfIcon($name)) . '" alt="" /> ';
- echo i18n::hsc($name).'</a>';
+ echo '<a href="' . ENTITY::hsc($viewUrl) . '">';
+ echo '<img src="' . ENTITY::hsc(sfIcon($name)) . '" alt="" /> ';
+ echo ENTITY::hsc($name).'</a>';
}
else
{
- echo '<img src="' . i18n::hsc(sfIcon($name)) . '" alt="" /> ';
- echo i18n::hsc($name);
+ echo '<img src="' . ENTITY::hsc(sfIcon($name)) . '" alt="" /> ';
+ echo ENTITY::hsc($name);
}
echo '</td><td>';
echo '</td><td>';
if (is_writable($directory . $name)) {
- echo '<a href="' . i18n::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_RENAME . '</a>';
+ echo '<a href="' . ENTITY::hsc($renUrl) . '" title="' . _SKINFILES_RENAME . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_RENAME . '</a>';
} else {
echo ' ';
}
echo '</td><td>';
if (is_writable($directory . $name)) {
- echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_DELETE . '</a>';
+ echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_DELETE . '</a>';
} else {
echo ' ';
}
echo '</td><td>';
if (is_writable($directory . $name) && sfAllowEditing($name))
- echo '<a href="'. i18n::hsc($editUrl) . '" title="' . _SKINFILES_EDIT . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_EDIT . '</a>';
+ echo '<a href="'. ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_EDIT . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_EDIT . '</a>';
else
echo ' ';
echo '</td><td>';
if (is_readable ($directory . $name))
- echo '<a href="' . i18n::hsc($dlUrl) . '" title="' . _SKINFILES_DOWNLOAD . ' «' . i18n::hsc($name) . '»">' . _SKINFILES_DOWNLOAD . '</a>';
+ echo '<a href="' . ENTITY::hsc($dlUrl) . '" title="' . _SKINFILES_DOWNLOAD . ' «' . ENTITY::hsc($name) . '»">' . _SKINFILES_DOWNLOAD . '</a>';
else
echo ' ';
if (is_writable($directory)) {
echo '<div class="dialogbox">';
echo '<h4 class="light">' . _SKINFILES_CREATE_NEW_FILE . '</h4><div>';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="createfile" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
echo '<input type="text" name="name" size="40" value="untitled.txt" />';
echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_CREATE_FILE . '" /></p></form>';
echo '</div></div>';
echo '<div class="dialogbox">';
echo '<h4 class="light">' . _SKINFILES_UPLOAD_NEW_FILE . '</h4><div>';
- echo '<form method="post" enctype="multipart/form-data" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" enctype="multipart/form-data" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="uploadfile" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
echo '<input type="hidden" name="MAX_FILE_SIZE" value="' . $CONF['MaxUploadSize'] . '" />';
echo '<input type="file" name="name" size="40" />';
echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_UPLOAD . '" /></p></form>';
if (count($files)) {
echo '<div class="dialogbox">';
echo '<h4 class="light">' . _SKINFILES_DEL_ALL_FILES . '</h4><div>';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="emptydir" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
echo _SKINFILES_DEL_ALL_FILES_MSG;
echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_DELETE_ALL . '" tabindex="140" onclick="return checkSubmit();" /></p>';
echo '</form>';
if (is_writable($directory)) {
echo '<div class="dialogbox">';
echo '<h4 class="light">' . _SKINFILES_CREATE_NEW_DIR . '</h4><div>';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="createdir" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative) . '" />';
echo '<input type="text" name="name" value="untitled" tabindex="90" size="40" />';
echo '<p class="buttons"><input type="submit" value="' . _SKINFILES_CREATE . '" tabindex="140" onclick="return checkSubmit();" /></p>';
echo '</form>';
$editUrl = $manager->addTicketToUrl($pluginUrl . '?action=rendir&dir=' . rawurlencode($relative . $file));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' «' . $file . '»">';
+ echo '<a href="' . ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' «' . $file . '»">';
echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="rendir_process" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
- echo '<h4>' . _SKINFILES_RENAME_DIR_MSG . ' «' . i18n::hsc($file) . '» ' . _SKINFILES_RENAME_DIR_MSG2 . '</h4><div>';
- echo '<p><input type="text" name="name" size="40" value="' . i18n::hsc($preset != '' ? $preset : $file) . '" /></p>';
+ echo '<h4>' . _SKINFILES_RENAME_DIR_MSG . ' «' . ENTITY::hsc($file) . '» ' . _SKINFILES_RENAME_DIR_MSG2 . '</h4><div>';
+ echo '<p><input type="text" name="name" size="40" value="' . ENTITY::hsc($preset != '' ? $preset : $file) . '" /></p>';
echo '<p class="buttons">';
echo '<input type="hidden" name="sure" value="yes" />';
echo '<input type="submit" value="' . _SKINFILES_RENAME . '" />';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . " «" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . " «" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
echo _SKINFILES_ERR_DIR_DOES_NOT_EXIST3 . "</p>";
}
}
$name = requestVar('name');
if ($name == '') {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR1 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR1 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR2 . "</p>";
_skinfiles_rendir($name);
return;
}
if (sfIllegalFilename($name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR3 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR3 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR4 . "</p>";
_skinfiles_rendir($name);
return;
}
if ($name == $file) {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR5 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR5 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR6 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR7 . "</p>";
_skinfiles_rendir($name);
return;
}
if (file_exists($directory . $name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR8 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR8 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_COULD_NOT_RENAME_DIR9 . _SKINFILES_ERR_COULD_NOT_RENAME_DIR10 . "</p>";
_skinfiles_rendir($name);
return;
if (!@rename($directory . $file, $directory . $name))
{
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR11 . "«" . i18n::hsc($file) . "»</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_RENAME_DIR11 . "«" . ENTITY::hsc($file) . "»</p>";
_skinfiles_rendir($name);
return;
}
- echo "<p class='message'>" . _SKINFILES_RENAMED_DIR1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_RENAMED_DIR2;
- echo _SKINFILES_RENAMED_DIR3 . "«" . i18n::hsc($name) . "»" . _SKINFILES_RENAMED_DIR4 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_RENAMED_DIR1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_RENAMED_DIR2;
+ echo _SKINFILES_RENAMED_DIR3 . "«" . ENTITY::hsc($name) . "»" . _SKINFILES_RENAMED_DIR4 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DIR_DOES_NOT_EXIST1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DIR_DOES_NOT_EXIST2;
echo _SKINFILES_ERR_DIR_DOES_NOT_EXIST3 . "</p>";
}
}
}
if (sfIllegalFilename($name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "«" . i18n::hsc($name) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "«" . ENTITY::hsc($name) . "» ";
echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR3 . "</p>";
sfShowDirectory($directory);
return;
}
if (file_exists($directory . $name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR4 . "«" . i18n::hsc($name) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR4 . "«" . ENTITY::hsc($name) . "» ";
echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR5 . _SKINFILES_ERR_COULD_NOT_CREATE_DIR6 . "</p>";
sfShowDirectory($directory);
return;
if (!@mkdir($directory . $name, 0755))
{
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "«" . i18n::hsc($name) . "»</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR2 . "«" . ENTITY::hsc($name) . "»</p>";
sfShowDirectory($directory);
return;
}
@umask($mask);
- echo "<p class='message'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR7 . "«" . i18n::hsc($name) . "» " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR8 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR7 . "«" . ENTITY::hsc($name) . "» " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR8 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR9 . "«" . i18n::hsc(basename($directory)) . "» " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR10;
+ echo "<p class='error'>" . _SKINFILES_ERR_COULD_NOT_CREATE_DIR9 . "«" . ENTITY::hsc(basename($directory)) . "» " . _SKINFILES_ERR_COULD_NOT_CREATE_DIR10;
echo _SKINFILES_ERR_COULD_NOT_CREATE_DIR11 . "</p>";
}
}
$delUrl = $manager->addTicketToUrl($pluginUrl . '?action=deldir&dir=' . rawurlencode($relative . $file));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . $file . '»">';
+ echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . $file . '»">';
echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="deldir_process" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
- echo '<h4>' . _SKINFILES_DELETE_DIR . ' «' . i18n::hsc($file) . '» ' . _SKINFILES_DELETE_DIR2 . '</h4><div>';
+ echo '<h4>' . _SKINFILES_DELETE_DIR . ' «' . ENTITY::hsc($file) . '» ' . _SKINFILES_DELETE_DIR2 . '</h4><div>';
echo '<p class="buttons">';
echo '<input type="hidden" name="sure" value="yes" />';
echo '<input type="submit" value="' . _SKINFILES_DELETE . '" />';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . " «" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . " «" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
}
}
{
if (!@rmdir($directory . $file))
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR4 . "«" . i18n::hsc($file) . "»</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR4 . "«" . ENTITY::hsc($file) . "»</p>";
sfShowDirectory($directory);
return;
}
- echo "<p class='message'>" . _SKINFILES_ERR_DELETE_DIR5 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR6 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_DELETE_DIR5 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR6 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
}
}
$emptyUrl = $manager->addTicketToUrl($pluginUrl . '?action=emptydir&dir=' . rawurlencode($relative . $file));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($emptyUrl) . '" title="Empty «' . $file . '»">';
+ echo '<a href="' . ENTITY::hsc($emptyUrl) . '" title="Empty «' . $file . '»">';
echo '<img src="' . $pluginUrl . 'dir.gif' . '" alt="" /> ' . $file . '</a></p>';
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="emptydir_process" />';
- echo '<input type="hidden" name="dir" value="' . i18n::hsc($relative . $file) . '" />';
+ echo '<input type="hidden" name="dir" value="' . ENTITY::hsc($relative . $file) . '" />';
- echo '<h4>' . _SKINFILES_DELETE_FILE_MSG . ' «' . i18n::hsc($file) . '»' . _SKINFILES_DELETE_FILE_MSG2 . '</h4><div>';
+ echo '<h4>' . _SKINFILES_DELETE_FILE_MSG . ' «' . ENTITY::hsc($file) . '»' . _SKINFILES_DELETE_FILE_MSG2 . '</h4><div>';
if (count($files))
{
echo '<ul>';
- foreach ($files as $name) { echo '<li>' . i18n::hsc($name) . '</li>'; }
+ foreach ($files as $name) { echo '<li>' . ENTITY::hsc($name) . '</li>'; }
echo '</ul>';
echo '<p class="buttons">';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_DIR1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_DIR2;
echo _SKINFILES_ERR_DELETE_DIR3 . "</p>";
}
}
is_writable($directory . $file . '/' . $name))
{
if (unlink ($directory .$file . '/' . $name))
- echo "<p class='message'>" . _SKINFILES_ERR_EMPTY_DIR1 . "«" . i18n::hsc($name) . "» " . _SKINFILES_ERR_EMPTY_DIR2 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_EMPTY_DIR1 . "«" . ENTITY::hsc($name) . "» " . _SKINFILES_ERR_EMPTY_DIR2 . "</p>";
else
- echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR3 . "«" . i18n::hsc($name) . "» " . _SKINFILES_ERR_EMPTY_DIR4 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR3 . "«" . ENTITY::hsc($name) . "» " . _SKINFILES_ERR_EMPTY_DIR4 . "</p>";
}
}
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR5 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_EMPTY_DIR6;
+ echo "<p class='error'>" . _SKINFILES_ERR_EMPTY_DIR5 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_EMPTY_DIR6;
echo _SKINFILES_ERR_EMPTY_DIR7 . "</p>";
}
}
$viewUrl = $manager->addTicketToUrl($pluginUrl . '?action=viewfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($viewUrl) . '" title="View «' . $file . '»">';
- echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+ echo '<a href="' . ENTITY::hsc($viewUrl) . '" title="View «' . $file . '»">';
+ echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
- echo '<h4>' . _SKINFILES_VIEW_FILE . '«' . i18n::hsc($file) . '»</h4>';
+ echo '<h4>' . _SKINFILES_VIEW_FILE . '«' . ENTITY::hsc($file) . '»</h4>';
if (sfIsFileType('html', $file))
{
$content = implode('', file($directory . $file));
echo '<pre>';
- echo i18n::hsc($content);
+ echo ENTITY::hsc($content);
echo '</pre>';
}
echo '<table>';
echo '<tr><th colspan="2">' . _SKINFILES_VIEW_FILE_IMG_INFO . '</th></tr>';
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_TYPE . '</td><td>' . i18n::hsc($type) . '</td></tr>';
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_WIDTH . '</td><td>' . i18n::hsc($size[0]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_HEIGHT . '</td><td>' . i18n::hsc($size[1]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_TYPE . '</td><td>' . ENTITY::hsc($type) . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_WIDTH . '</td><td>' . ENTITY::hsc($size[0]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_HEIGHT . '</td><td>' . ENTITY::hsc($size[1]) . _SKINFILES_VIEW_FILE_PX . '</td></tr>';
if (isset($size['channels']) || isset($size['bits']))
{
$channels = isset($size['channels']) ? $size['channels'] : 3;
$depth = $size[2] == IMAGETYPE_GIF ? $size['bits'] : $size['bits'] * $channels;
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_CHANNELS . '</td><td>' . i18n::hsc($channels) . '</td></tr>';
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLOR_DEPTH . '</td><td>' . i18n::hsc($depth) . _SKINFILES_VIEW_FILE_BITS . '</td></tr>';
- echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLORS . '</td><td>' . i18n::hsc(pow(2, $depth)) . _SKINFILES_VIEW_FILE_COLORS2 . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_CHANNELS . '</td><td>' . ENTITY::hsc($channels) . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLOR_DEPTH . '</td><td>' . ENTITY::hsc($depth) . _SKINFILES_VIEW_FILE_BITS . '</td></tr>';
+ echo '<tr><td>' . _SKINFILES_VIEW_FILE_COLORS . '</td><td>' . ENTITY::hsc(pow(2, $depth)) . _SKINFILES_VIEW_FILE_COLORS2 . '</td></tr>';
}
echo '<tr><th colspan="2">Exif information</th></tr>';
if (isset($exif['Make']) && isset($exif['Model']))
- echo '<tr><td>Camera:</td><td>' . i18n::hsc($exif['Make'] . ' ' . $exif['Model']) . '</td></tr>';
+ echo '<tr><td>Camera:</td><td>' . ENTITY::hsc($exif['Make'] . ' ' . $exif['Model']) . '</td></tr>';
if (isset($exif['DateTime']))
- echo '<tr><td>Created on:</td><td>' . i18n::hsc($exif['DateTime']) . '</td></tr>';
+ echo '<tr><td>Created on:</td><td>' . ENTITY::hsc($exif['DateTime']) . '</td></tr>';
if (isset($exif['XResolution']))
- echo '<tr><td>Horizontal resolution:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['XResolution'])) . ' dpi</td></tr>';
+ echo '<tr><td>Horizontal resolution:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['XResolution'])) . ' dpi</td></tr>';
if (isset($exif['YResolution']))
- echo '<tr><td>Vertical resolution:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['YResolution'])) . ' dpi</td></tr>';
+ echo '<tr><td>Vertical resolution:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['YResolution'])) . ' dpi</td></tr>';
if (isset($exif['FocalLength']))
- echo '<tr><td>Focal length:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['FocalLength'])) . ' mm</td></tr>';
+ echo '<tr><td>Focal length:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['FocalLength'])) . ' mm</td></tr>';
if (isset($exif['FNumber']))
- echo '<tr><td>F-number:</td><td>F/' . i18n::hsc(_skinfiles_exif_prepare($exif['FNumber'])) . '</td></tr>';
+ echo '<tr><td>F-number:</td><td>F/' . ENTITY::hsc(_skinfiles_exif_prepare($exif['FNumber'])) . '</td></tr>';
if (isset($exif['ExposureTime']))
- echo '<tr><td>Exposuretime:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['ExposureTime'])) . ' sec</td></tr>';
+ echo '<tr><td>Exposuretime:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['ExposureTime'])) . ' sec</td></tr>';
if (isset($exif['ISOSpeedRatings']))
- echo '<tr><td>ISO-speed:</td><td>' . i18n::hsc(_skinfiles_exif_prepare($exif['ISOSpeedRatings'])) . '</td></tr>';
+ echo '<tr><td>ISO-speed:</td><td>' . ENTITY::hsc(_skinfiles_exif_prepare($exif['ISOSpeedRatings'])) . '</td></tr>';
}
}
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_VIEW_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_VIEW_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_VIEW_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_VIEW_FILE2;
echo _SKINFILES_ERR_VIEW_FILE3 . "</p>";
}
}
$editUrl = $manager->addTicketToUrl($pluginUrl . '?action=editfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($editUrl) . '" title="Edit «' . $file . '»">';
- echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+ echo '<a href="' . ENTITY::hsc($editUrl) . '" title="Edit «' . $file . '»">';
+ echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
$content = implode('', file($directory . $file));
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="editfile_process" />';
- echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+ echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
- echo '<h4>' . _SKINFILES_EDIT_FILE_MSG . ' «' . i18n::hsc($file) . '»</h4><div>';
+ echo '<h4>' . _SKINFILES_EDIT_FILE_MSG . ' «' . ENTITY::hsc($file) . '»</h4><div>';
echo '<p><textarea class="skinedit" tabindex="8" rows="20" cols="80" name="content">';
- echo i18n::hsc($content);
+ echo ENTITY::hsc($content);
echo '</textarea></p>';
echo '<p class="buttons">';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE2;
echo _SKINFILES_ERR_EDIT_FILE3 . "</p>";
}
}
}
if ($success)
- echo "<p class='message'>" . _SKINFILES_ERR_EDIT_FILE4 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE5 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_EDIT_FILE4 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE5 . "</p>";
else
- echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE6 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE7 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE6 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE7 . "</p>";
_skinfiles_editfile();
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_EDIT_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_EDIT_FILE2;
echo _SKINFILES_ERR_EDIT_FILE3 . "</p>";
}
}
$editUrl = $manager->addTicketToUrl($pluginUrl . '?action=renfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' «' . $file . '»">';
- echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+ echo '<a href="' . ENTITY::hsc($editUrl) . '" title="' . _SKINFILES_RENAME . ' «' . $file . '»">';
+ echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="renfile_process" />';
- echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+ echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
- echo '<h4>' . _SKINFILES_RENAME_FILE_MSG . '«' . i18n::hsc($file) . '» ' . _SKINFILES_RENAME_FILE_MSG2 . '</h4><div>';
- echo '<p><input type="text" name="name" size="40" value="' . i18n::hsc($preset != '' ? $preset : $file) . '" /></p>';
+ echo '<h4>' . _SKINFILES_RENAME_FILE_MSG . '«' . ENTITY::hsc($file) . '» ' . _SKINFILES_RENAME_FILE_MSG2 . '</h4><div>';
+ echo '<p><input type="text" name="name" size="40" value="' . ENTITY::hsc($preset != '' ? $preset : $file) . '" /></p>';
echo '<p class="buttons">';
echo '<input type="hidden" name="sure" value="yes" /">';
echo '<input type="submit" value="' . _SKINFILES_RENAME . '" />';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE2;
echo _SKINFILES_ERR_RENAME_FILE3 . "</p>";
}
}
$name = requestVar('name');
if ($name == '') {
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE4 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE4 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_RENAME_FILE5 . "</p>";
_skinfiles_renfile($name);
return;
}
if (sfIllegalFilename($name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE6 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE6 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_RENAME_FILE7 . "</p>";
_skinfiles_renfile($name);
return;
}
if ($name == $file) {
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE8 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE8 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_RENAME_FILE9 . "</p>";
_skinfiles_renfile($name);
return;
}
if (file_exists($directory . $name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE10 . "«" . i18n::hsc($file) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE10 . "«" . ENTITY::hsc($file) . "» ";
echo _SKINFILES_ERR_RENAME_FILE11;
echo _SKINFILES_ERR_RENAME_FILE12 . "</p>";
_skinfiles_renfile($name);
if (!@rename($directory . $file, $directory . $name))
{
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE13 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE14 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE13 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE14 . "</p>";
_skinfiles_renfile($name);
return;
}
- echo "<p class='message'>" . _SKINFILES_ERR_RENAME_FILE15 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE16;
- echo _SKINFILES_ERR_RENAME_FILE17 . "«" . i18n::hsc($name) . "»" . _SKINFILES_ERR_RENAME_FILE18 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_RENAME_FILE15 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE16;
+ echo _SKINFILES_ERR_RENAME_FILE17 . "«" . ENTITY::hsc($name) . "»" . _SKINFILES_ERR_RENAME_FILE18 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_RENAME_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_RENAME_FILE2;
echo _SKINFILES_ERR_RENAME_FILE3 . "</p>";
}
}
}
if (sfIllegalFilename($name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE2 . "«" . i18n::hsc($name) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE2 . "«" . ENTITY::hsc($name) . "» ";
echo _SKINFILES_ERR_CREATE_FILE3 . "</p>";
sfShowDirectory($directory);
return;
}
if (file_exists($directory . $name)) {
- echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE4 . "«" . i18n::hsc($name) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE4 . "«" . ENTITY::hsc($name) . "» ";
echo _SKINFILES_ERR_CREATE_FILE5;
echo _SKINFILES_ERR_CREATE_FILE6 . "</p>";
sfShowDirectory($directory);
if (!@touch($directory . $name))
{
- echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE7 . "«" . i18n::hsc($name) . "» " . _SKINFILES_ERR_CREATE_FILE8 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE7 . "«" . ENTITY::hsc($name) . "» " . _SKINFILES_ERR_CREATE_FILE8 . "</p>";
sfShowDirectory($directory);
return;
}
@chmod($directory . $name, 0755);
@umask($mask);
- echo "<p class='message'>" . _SKINFILES_ERR_CREATE_FILE9 . "«" . i18n::hsc($name) . "» " . _SKINFILES_ERR_CREATE_FILE10 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_CREATE_FILE9 . "«" . ENTITY::hsc($name) . "» " . _SKINFILES_ERR_CREATE_FILE10 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE11 . "«" . i18n::hsc(basename($directory)) . "» " . _SKINFILES_ERR_CREATE_FILE12;
+ echo "<p class='error'>" . _SKINFILES_ERR_CREATE_FILE11 . "«" . ENTITY::hsc(basename($directory)) . "» " . _SKINFILES_ERR_CREATE_FILE12;
echo _SKINFILES_ERR_CREATE_FILE13 . "</p>";
}
}
$delUrl = $manager->addTicketToUrl($pluginUrl . '?action=delfile&file=' . rawurlencode(sfRelativePath($directory . $file)));
echo '<p class="location">' . _SKINFILES_CURRENT_LOCATION . sfDisplayPath($relative);
- echo '<a href="' . i18n::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . $file . '»">';
- echo '<img src="' . i18n::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
+ echo '<a href="' . ENTITY::hsc($delUrl) . '" title="' . _SKINFILES_DELETE . ' «' . $file . '»">';
+ echo '<img src="' . ENTITY::hsc(sfIcon($file)) . '" alt="" /> ' . $file . '</a></p>';
echo '<div class="dialogbox">';
- echo '<form method="post" action="' . i18n::hsc($pluginUrl) . '">';
+ echo '<form method="post" action="' . ENTITY::hsc($pluginUrl) . '">';
$manager->addTicketHidden();
echo '<input type="hidden" name="action" value="delfile_process" />';
- echo '<input type="hidden" name="file" value="' . i18n::hsc(sfRelativePath($directory . $file)) . '" />';
+ echo '<input type="hidden" name="file" value="' . ENTITY::hsc(sfRelativePath($directory . $file)) . '" />';
- echo '<h4>' . _SKINFILES_DELETE_FILE . ' «' . i18n::hsc($file) . '» ' . _SKINFILES_DELETE_FILE2 . '</h4><div>';
+ echo '<h4>' . _SKINFILES_DELETE_FILE . ' «' . ENTITY::hsc($file) . '» ' . _SKINFILES_DELETE_FILE2 . '</h4><div>';
echo '<p class="buttons">';
echo '<input type="hidden" name="sure" value="yes" />';
echo '<input type="submit" value="' . _SKINFILES_DELETE . '" />';
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE2;
echo _SKINFILES_ERR_DELETE_FILE3 . "</p>";
}
}
{
if (!@unlink($directory . $file))
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE4 . "«" . i18n::hsc($file) . "»</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE4 . "«" . ENTITY::hsc($file) . "»</p>";
sfShowDirectory($directory);
return;
}
- echo "<p class='message'>" . _SKINFILES_ERR_DELETE_FILE5 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE6 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_DELETE_FILE5 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE6 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "«" . i18n::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE2;
+ echo "<p class='error'>" . _SKINFILES_ERR_DELETE_FILE1 . "«" . ENTITY::hsc($file) . "» " . _SKINFILES_ERR_DELETE_FILE2;
echo _SKINFILES_ERR_DELETE_FILE3 . "</p>";
}
}
$file = postFileInfo('name');
if ($file['size'] > $CONF['MaxUploadSize']) {
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . i18n::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_FILE_TOO_BIG . "<br />";
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . ENTITY::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_FILE_TOO_BIG . "<br />";
echo _SKINFILES_ERR_UPLOAD_FILE3 . $CONF['MaxUploadSize'] . " / ";
echo $file['size'] . " bytes</p>";
sfShowDirectory($directory);
}
if (!is_uploaded_file($file['tmp_name'])) {
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . i18n::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_BADREQUEST . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . ENTITY::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_BADREQUEST . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
sfShowDirectory($directory);
return;
}
if (sfIllegalFilename($file['name'])) {
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE5 . "«" . i18n::hsc($file['name']) . "» ";
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE5 . "«" . ENTITY::hsc($file['name']) . "» ";
echo _SKINFILES_ERR_UPLOAD_FILE6 . "</p>";
sfShowDirectory($directory);
return;
}
if (file_exists($directory . $file['name'])) {
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . i18n::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADDUPLICATE . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . ENTITY::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADDUPLICATE . "</p>";
sfShowDirectory($directory);
return;
}
if (!@move_uploaded_file($file['tmp_name'], $directory . $file['name'])) {
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . i18n::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADMOVEP . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE1 . "«" . ENTITY::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE2 . _ERROR_UPLOADMOVEP . _SKINFILES_ERR_UPLOAD_FILE4 . "</p>";
sfShowDirectory($directory);
}
@chmod($directory . $file['name'], 0755);
@umask($mask);
- echo "<p class='message'>" . _SKINFILES_ERR_UPLOAD_FILE7 . "«" . i18n::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE8 . "</p>";
+ echo "<p class='message'>" . _SKINFILES_ERR_UPLOAD_FILE7 . "«" . ENTITY::hsc($file['name']) . "» " . _SKINFILES_ERR_UPLOAD_FILE8 . "</p>";
sfShowDirectory($directory);
}
else
{
- echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE9 . "«" . i18n::hsc(basename($directory)) . "» " . _SKINFILES_ERR_UPLOAD_FILE10;
+ echo "<p class='error'>" . _SKINFILES_ERR_UPLOAD_FILE9 . "«" . ENTITY::hsc(basename($directory)) . "» " . _SKINFILES_ERR_UPLOAD_FILE10;
echo _SKINFILES_ERR_UPLOAD_FILE11 . "</p>";
}
}
?>
<rss version="2.0">
<channel>
- <title><?php echo i18n::hsc($CONF['SiteName']); ?></title>
- <link><?php echo i18n::hsc($CONF['IndexURL']); ?></link>
+ <title><?php echo ENTITY::hsc($CONF['SiteName']); ?></title>
+ <link><?php echo ENTITY::hsc($CONF['IndexURL']); ?></link>
<description></description>
<docs>http://backend.userland.com/rss</docs>
</channel>