Dleshka.org

+5
TipTop 25-01-2010, 20:38 DLE 1


. - .

DataLife Engine: 7.5, 8.0, 8.2, 8.3

, :
engine\skins\default.js :
function ShowOrHide2(d1) {
if (d1 != '') DoDiv2(d1);
}


function DoDiv2(id) {
var item = null;
if (document.getElementById) {
item = document.getElementById(id);
} else if (document.all){
item = document.all[id];
} else if (document.layers){
item = document.layers[id];
}
if (!item) {
}
else if (item.style) {
if (item.style.display == "none"){ item.style.display = ""; }
else {item.style.display = "none"; }
}else{ item.visibility = "show"; }
} 

function inserticon(a,b)
{
document.getElementById(b).value=a;
$("#"+b).focus()
}




2. engine\inc\categories.php
( #306):
<input class="edit" value="{$row['icon']}" type="text" name="cat_icon"><a href="#" class="hintanchor" onmouseover="showhint('{$lang[hint_caticon]}', this, event, '250px')">[?]</a>


:
<input class="edit" value="{$row['icon']}" type="text" name="cat_icon" id="cat_icon"><a href="#" class="hintanchor" onmouseover="showhint('{$lang[hint_caticon]}', this, event, '250px')">[?]</a>
<br>
<a href="javascript:ShowOrHide2('icolist');javascript:ShowOrHide2('title');javascript:ShowOrHide2('title2');"><div id="title">[   ]</div><div id="title2" style="display:none;">[  ]</div></a>
<br/>$iconlist



( #483):
<input class="edit" onfocus="this.select()" value="$lang[cat_icon]" type="text" name="cat_icon"><a href="#" class="hintanchor" onmouseover="showhint('{$lang[hint_caticon]}', this, event, '250px')">[?]</a>


:
<input class="edit" onfocus="this.select()" value="$lang[cat_icon]" type="text" name="cat_icon" id="cat_icon"><a href="#" class="hintanchor" onmouseover="showhint('{$lang[hint_caticon]}', this, event, '250px')">[?]</a>
<br>
<a href="javascript:ShowOrHide2('icolist');javascript:ShowOrHide2('title');javascript:ShowOrHide2('title2');"><div id="title">[   ]</div><div id="title2" style="display:none;">[  ]</div></a>
<br/>$iconlist



( #275):
$row['news_msort'] = makeDropDown( array ("" => $lang['sys_global'], "DESC" => $lang['opt_sys_mminus'], "ASC" => $lang['opt_sys_mplus'] ), "news_msort", $row['news_msort'] );


, :

 $dir= ROOT_DIR.'/uploads/icons';
$columnsnum = 8;
if ($handle = opendir($dir)) 
{
$i = 0;
$iconlist = "<div id="icolist" style="display:none;"><table><tr>";
while (false !== ($file = readdir($handle))) 
 {
if ($file != '.' and $file != '..' and $file != '.htaccess' and $file != 'Thumbs.db' and $file != 'system' and $file != 'index.html')
{
$ext = explode(".", $file);
$icons = explode(",", $file);

foreach($icons as $iconame) 
{
if(end($ext) == "gif" OR end($ext) == "png")
{
$i++; $iconame = trim($iconame);
$iconlist .= "<td align="center" style="padding:5px;"><img style="border: 0; cursor: pointer;" src="".$config['http_home_url']."uploads/icons/$iconame" alt="$iconame" onclick="inserticon('$config[http_home_url]uploads/icons/$iconame', 'cat_icon')" /></td>";
if ($i%$columnsnum == 0) $iconlist .= "</tr><tr>";
}
}
}
}

$iconlist .= "</tr></table></div>";

closedir($handle);
 }



( #481):
$skinlist = SelectSkin( '' );

, :

$dir= ROOT_DIR.'/uploads/icons';
$columnsnum = 8;
if ($handle = opendir($dir)) 
{
$i = 0;
$iconlist = "<div id="icolist" style="display:none;"><table><tr>";
while (false !== ($file = readdir($handle))) 
 {
if ($file != '.' and $file != '..' and $file != '.htaccess' and $file != 'Thumbs.db' and $file != 'system' and $file != 'index.html')
{
$ext = explode(".", $file);
$icons = explode(",", $file);

foreach($icons as $iconame) 
{
if(end($ext) == "gif" OR end($ext) == "png")
{
$i++; $iconame = trim($iconame);
$iconlist .= "<td align="center" style="padding:5px;"><img style="border: 0; cursor: pointer;" src="".$config['http_home_url']."uploads/icons/$iconame" alt="$iconame" onclick="inserticon('$config[http_home_url]uploads/icons/$iconame', 'cat_icon')" /></td>";
if ($i%$columnsnum == 0) $iconlist .= "</tr><tr>";
}
}
}
}

$iconlist .= "</tr></table></div>";

closedir($handle);
 }



( #726):
echo "<img border=0 src="" . $cat_info[$id]['icon'] . "" height=40 width=40 alt="" . $cat_info[$id]['icon'] . "">";


:
echo "<img border=0 src="" . $cat_info[$id]['icon'] . "" alt="" . $cat_info[$id]['icon'] . "">";



icons uploads gif png.

! () :

! .
dimchik
19 2010 02:32
Parse error: syntax error, unexpected T_STRING in K:\home\test1.ru\www\engine\inc\categories.php on line 281 . 281 .
$iconlist = "< div id = "icolist" style="display:none;"><table><tr>";
8.5

, , .