onokazu
onoka****@users*****
2005年 8月 3日 (水) 21:39:17 JST
Index: xoops2jp/html/modules/system/admin/tplsets/main.php diff -u xoops2jp/html/modules/system/admin/tplsets/main.php:1.3 xoops2jp/html/modules/system/admin/tplsets/main.php:1.4 --- xoops2jp/html/modules/system/admin/tplsets/main.php:1.3 Sat Jun 11 11:32:53 2005 +++ xoops2jp/html/modules/system/admin/tplsets/main.php Wed Aug 3 21:39:17 2005 @@ -1,5 +1,5 @@ <?php -// $Id: main.php,v 1.3 2005/06/11 02:32:53 onokazu Exp $ +// $Id: main.php,v 1.4 2005/08/03 12:39:17 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -197,7 +197,7 @@ foreach ($notinst_files as $nfile) { if ($nfile != 'index.html') { echo '<tr><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;"> </td><td style="background-color:#FFFF99; padding: 5px;">'; - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/'.$nfile; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/'.$nfile; if (file_exists($physical_file)) { echo '[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=importtpl&file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]'; } else { @@ -227,7 +227,7 @@ } echo '<tr class="'.$class.'"><td class="head"><span style="font-weight:bold;">'.$btemplates[$j]->getVar('tpl_file').'</span><br /><br /><span style="font-weight:normal;">'.$btemplates[$j]->getVar('tpl_desc').'</span></td><td>'.formatTimestamp($last_modified, 'l').'</td>'; $filename = $btemplates[$j]->getVar('tpl_file'); - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$filename; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$filename; if ($tplset != 'default') { if (file_exists($physical_file)) { $mtime = filemtime($physical_file); @@ -257,7 +257,7 @@ foreach ($bnotinst_files as $nfile) { if ($nfile != 'index.html') { echo '<tr style="background-color:#FFFF99;"><td style="background-color:#FFFF99; padding: 5px;">'.$nfile.'</td><td style="background-color:#FFFF99; padding: 5px;"> </td><td style="background-color:#FFFF99; padding: 5px;">'; - $physical_file = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$moddir.'/blocks/'.$nfile; + $physical_file = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$moddir.'/blocks/'.$nfile; if (file_exists($physical_file)) { echo '[<a href="admin.php?fct=tplsets&moddir='.$moddir.'&tplset='.$tplset.'&op=importtpl&file='.urlencode($nfile).'">'._MD_IMPORT.'</a>]'; } else { @@ -1083,7 +1083,7 @@ for ($i = 0; $i < $fcount; $i++) { $newtpl =& $tplfiles[$i]->xoopsClone(); $newtpl->setVar('tpl_id', 0); - $newtpl->setVar('tpl_tplset', $tplset); + $newtpl->setVar('tpl_tplset', $_POST['tplset']); $newtpl->setVar('tpl_lastmodified', time()); $newtpl->setVar('tpl_lastimported', 0); if (!$tpltpl_handler->insert($newtpl)) { @@ -1358,6 +1358,9 @@ xoops_cp_footer(); break; case 'importtpl_go': + if (!xoops_confirm_validate()) { + redirect_header('admin.php?fct=tplsets',3,'Ticket Error'); + } $tplset = $_POST['tplset']; $moddir = $_POST['moddir']; $id = !empty($_POST['id']) ? intval($_POST['id']) : 0; @@ -1374,10 +1377,10 @@ if (is_object($tplfile)) { switch ($tplfile->getVar('tpl_type')) { case 'module': - $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file'); + $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/'.$tplfile->getVar('tpl_file'); break; case 'block': - $filepath = XOOPS_ROOT_PATH.'/templates/'.$tplset.'/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file'); + $filepath = XOOPS_THEME_PATH.'/'.$tplset.'/templates/'.$tplfile->getVar('tpl_module').'/blocks/'.$tplfile->getVar('tpl_file'); break; default: break; Index: xoops2jp/html/modules/system/admin/tplsets/themeimgform.php diff -u xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.2 xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.3 --- xoops2jp/html/modules/system/admin/tplsets/themeimgform.php:1.2 Fri Mar 18 21:52:38 2005 +++ xoops2jp/html/modules/system/admin/tplsets/themeimgform.php Wed Aug 3 21:39:17 2005 @@ -1,5 +1,5 @@ <?php -// $Id: themeimgform.php,v 1.2 2005/03/18 12:52:38 onokazu Exp $ +// $Id: themeimgform.php,v 1.3 2005/08/03 12:39:17 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org // @@ -35,7 +35,7 @@ if ($icount > 0) { echo '<form action="admin.php" method="post" enctype="multipart/form-data"><table width="100%" class="outer" cellspacing="1"><tr><th colspan="3">'._MD_EDITSKINIMG.'</th></tr>'; for ($i = 0; $i < $icount; $i++) { - echo '<tr><td rowspan="3" valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr><tr><td class="head">'._MD_IMGNEWFILE.'</td><td class="even"><input type="file" name="imgfiles['.$imgs[$i]->getVar('imgsetimg_id').']" /></td></tr><tr><td class="head">'._MD_IMGDELETE.'</td><td class="even"><input type="checkbox" name="imgdelete['.$imgs[$i]->getVar('imgsetimg_id').']" value="1" /><input type="hidden" name="imgids[]" value="'.$imgs[$i]->getVar('imgsetimg_id').'" /></td></tr>'; + echo '<tr><td rowspan="3" valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr><tr><td class="head">'._MD_IMGNEWFILE.'</td><td class="even"><input type="file" name="imgfiles['.$imgs[$i]->getVar('imgsetimg_id').']" /></td></tr><tr><td class="head">'._MD_IMGDELETE.'</td><td class="even"><input type="checkbox" name="imgdelete['.$imgs[$i]->getVar('imgsetimg_id').']" value="1" /><input type="hidden" name="imgids[]" value="'.$imgs[$i]->getVar('imgsetimg_id').'" /></td></tr>'; } echo '<tr class="foot"><td colspan="3" align="center"><input type="hidden" name="tplset" value="'.$tplset.'" /><input type="hidden" name="op" value="updateimage" /><input type="hidden" name="fct" value="tplsets" /><input type="hidden" name="imgset" value="'.$imgs[0]->getVar('imgsetimg_imgset').'" /><input type="submit" name="imgsubmit" value="'._SUBMIT.'" /></td></tr></table></form>'; } @@ -49,7 +49,7 @@ } else { echo '<table width="100%" class="outer" cellspacing="1"><tr><th colspan="3">'._MD_SKINIMGS.'</th></tr>'; for ($i = 0; $i < $icount; $i++) { - echo '<tr><td valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr>'; + echo '<tr><td valign="middle" align="center" class="odd"><img src="admin.php?fct=tplsets&op=showimage&id='.$imgs[$i]->getVar('imgsetimg_id').'" alt="" /></td><td class="head">'._MD_IMGFILE.'</td><td class="even">'.$imgs[$i]->getVar('imgsetimg_file').'</td></tr>'; } echo '</table>'; } Index: xoops2jp/html/modules/system/admin/tplsets/tplform.php diff -u xoops2jp/html/modules/system/admin/tplsets/tplform.php:1.3 xoops2jp/html/modules/system/admin/tplsets/tplform.php:1.4 --- xoops2jp/html/modules/system/admin/tplsets/tplform.php:1.3 Sat Jun 11 11:32:53 2005 +++ xoops2jp/html/modules/system/admin/tplsets/tplform.php Wed Aug 3 21:39:17 2005 @@ -1,5 +1,5 @@ <?php -// $Id: tplform.php,v 1.3 2005/06/11 02:32:53 onokazu Exp $ +// $Id: tplform.php,v 1.4 2005/08/03 12:39:17 onokazu Exp $ // ------------------------------------------------------------------------ // // XOOPS - PHP Content Management System // // Copyright (c) 2000 XOOPS.org //