}
/* css data */
+// http://www.magmagateau.com/fuukaba/ is the source of the code below
$style_load = false;
$style_bar = '';
$jsdonk = 'var style_cookie = "';
$jsdonk .= ($style_bar) ? 'yo_style' : '';
$jsdonk .= '";';
-// http://www.magmagateau.com/fuukaba/ is the source of the code above w
////++++
/* 輸出表頭 */
/* 網址自動連結 */
/* オートリンク */
function auto_link_callback($matches){
- return (strtolower($matches[3]) == "</a>") ? $matches[0] : preg_replace('/(https?|ftp|news|gopher)(:\/\/[\w\+\$\;\?\.\{\}%,!#~*\/:@&=_-]+)/u', '<a href="$1$2" rel="_blank">$1$2</a>', $matches[0]);
+ return (strtolower($matches[3]) == "</a>") ? $matches[0] : preg_replace('/(https?|ftp|news|irc|gopher)(:\/\/[\w\+\$\;\?\.\{\}%,!#~*\/:@&=_-]+)/u', '<a href="$1$2" rel="_blank">$1$2</a>', $matches[0]);
}
function auto_link($proto){
$proto = preg_replace('|<br\s*/?>|',"\n",$proto);
</html>');
}
-////////////////
-// manage_css //
-////////////////
+/* manage_css */
+// http://www.magmagateau.com/fuukaba/ is the source of the code below
function manage_css(){
global $PMS, $language;
$order = array(); $line = '';
// Success messages
$action = (file_exists($style_dat)) ? _t('admin_updated') : _t('admin_created');
- $delete = (@unlink(CSS_DIR.CSVSS)) ? ' - <span class="warning">'.str_replace('[file]', CSS_DIR.CSVSS, _t('admin_deleted')).'</span>' : false;
+ //---- $delete = (@unlink(CSS_DIR.CSVSS)) ? ' - <span class="warning">'.str_replace('[file]', CSS_DIR.CSVSS, _t('admin_deleted')).'</span>' : false;
$fp = fopen($style_dat, 'w+');
set_file_buffer($fp, 0);
rewind($fp);
fputs($fp, $line);
fclose($fp);
@chmod($style_dat, 0666);
- echo '<div class="bar_managecss">'.str_replace('[file]', $style_dat, _t('admin_updated')).$delete.'</div>';
+ echo '<div class="bar_managecss">'.str_replace('[file]', $style_dat, _t('admin_updated'))./*----$delete.*/'</div>';
}
// Editing messages
if(file_exists(DATA_DIR.CSV_SS)){
$style_data = DATA_DIR.CSV_SS;
$style_mode = _t('admin_editing');
- }else{
- $style_data = CSS_DIR.CSVSS;
- $style_mode = _t('admin_imported');
+ //---- }else{
+ //---- $style_data = CSS_DIR.CSVSS;
+ //---- $style_mode = _t('admin_imported');
}
echo '<div class="banner"><table width="100%"><tr><th class="bar_managecss">
'.str_replace('[file]', $style_data, $style_mode).'
}
// Read data from R3 DAT
- else if(file_exists(CSS_DIR.CSVSS)){
- $style_data = CSS_DIR.CSVSS;
- $lines = explode("\n", file_get_contents($style_data));
- $j = 0;
- foreach($lines as $null => $line){ // Line has data, or line is not commented out
- if(substr($line, 0, 2) != '//' && $line != ''){
- $bits = explode('[*]', $line);
- $j++;
- $style_name = $bits[0];
- $style_path = CSS_DIR.$bits[2];
- if(file_exists($style_path)){
- $style_short = $bits[1];
- if($bits[3]) $style_rel = ' checked="checked"';
- else $style_rel = false;
- $class = ($j % 2) ? 'row1' : 'row2'; // BG colour
- echo '<tr class="'.$class.'"><td align="left" colspan="2"><label><input name="default" type="radio"'.$style_rel.' value="'.$style_name.'" /> '.$style_path.'</label><input type="hidden" name="path['.$style_name.']" value="'.$bits[2].'" /></td><td align="left"><input name="names['.$style_name.']" value="'.$style_name.'" size="25" /></td><td align="left"><input name="short['.$style_name.']" value="'.$style_short.'" size="5" /></td><td align="left"><input name="order['.$style_name.']" size="2" value="'.$j.'" /></td></tr>';
- }
- }
- }
- }
+ //---- else if(file_exists(CSS_DIR.CSVSS)){
+ //---- $style_data = CSS_DIR.CSVSS;
+ //---- $lines = explode("\n", file_get_contents($style_data));
+ //---- $j = 0;
+ //---- foreach($lines as $null => $line){ // Line has data, or line is not commented out
+ //---- if(substr($line, 0, 2) != '//' && $line != ''){
+ //---- $bits = explode('[*]', $line);
+ //---- $j++;
+ //---- $style_name = $bits[0];
+ //---- $style_path = CSS_DIR.$bits[2];
+ //---- if(file_exists($style_path)){
+ //---- $style_short = $bits[1];
+ //---- if($bits[3]) $style_rel = ' checked="checked"';
+ //---- else $style_rel = false;
+ //---- $class = ($j % 2) ? 'row1' : 'row2'; // BG colour
+ //---- echo '<tr class="'.$class.'"><td align="left" colspan="2"><label><input name="default" type="radio"'.$style_rel.' value="'.$style_name.'" /> '.$style_path.'</label><input type="hidden" name="path['.$style_name.']" value="'.$bits[2].'" /></td><td align="left"><input name="names['.$style_name.']" value="'.$style_name.'" size="25" /></td><td align="left"><input name="short['.$style_name.']" value="'.$style_short.'" size="5" /></td><td align="left"><input name="order['.$style_name.']" size="2" value="'.$j.'" /></td></tr>';
+ //---- }
+ //---- }
+ //---- }
+ //---- }
$j++; $class = ($j % 2) ? 'row1' : 'row2';