[xoops-cvslog 2373] CVS update: xoops2jp/html/install/class

Back to archive index

NobuNobu nobun****@users*****
2006年 3月 7日 (火) 22:11:39 JST


Index: xoops2jp/html/install/class/cachemanager.php
diff -u xoops2jp/html/install/class/cachemanager.php:1.2 xoops2jp/html/install/class/cachemanager.php:1.2.8.1
--- xoops2jp/html/install/class/cachemanager.php:1.2	Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/cachemanager.php	Tue Mar  7 22:11:39 2006
@@ -28,7 +28,7 @@
 * cache_manager for XOOPS installer
 *
 * @author Haruki Setoyama  <haruk****@plane*****>
-* @version $Id: cachemanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $
+* @version $Id: cachemanager.php,v 1.2.8.1 2006/03/07 13:11:39 nobunobu Exp $
 * @access public
 **/
 class cache_manager {
@@ -47,15 +47,14 @@
     }
 
     function report(){
-        $content = "<table align='center'><tr><td align='left'>\n";
+        $reports = array();
         foreach($this->s_files as $val){
-            $content .= _OKIMG.sprintf(_INSTALL_L123, "<b>$val</b>")."<br />\n";
+            $reports[]= _OKIMG.sprintf(_INSTALL_L123, "<b>$val</b>");
         }
         foreach($this->f_files as $val){
-            $content .= _NGIMG.sprintf(_INSTALL_L124, "<b>$val</b>")."<br />\n";
+            $reports[] = _NGIMG.sprintf(_INSTALL_L124, "<b>$val</b>");
         }
-        $content .= "</td></tr></table>\n";
-        return $content;
+        return $reports;
     }
 
 }
Index: xoops2jp/html/install/class/dbmanager.php
diff -u xoops2jp/html/install/class/dbmanager.php:1.2.8.1 xoops2jp/html/install/class/dbmanager.php:1.2.8.2
--- xoops2jp/html/install/class/dbmanager.php:1.2.8.1	Tue Dec 27 00:48:44 2005
+++ xoops2jp/html/install/class/dbmanager.php	Tue Mar  7 22:11:39 2006
@@ -32,7 +32,7 @@
 * database manager for XOOPS installer
 *
 * @author Haruki Setoyama  <haruk****@plane*****>
-* @version $Id: dbmanager.php,v 1.2.8.1 2005/12/26 15:48:44 minahito Exp $
+* @version $Id: dbmanager.php,v 1.2.8.2 2006/03/07 13:11:39 nobunobu Exp $
 * @access public
 **/
 class db_manager {
@@ -132,50 +132,49 @@
     }
 
     function report(){
-        $content = "<table align='center'><tr><td align='left'>\n";
+        $reports = array();
         if (isset($this->s_tables['create'])) {
             foreach($this->s_tables['create'] as $key => $val){
-                $content .= _OKIMG.sprintf(_INSTALL_L45, "<b>$key</b>")."<br />\n";
+                $reports[] = _OKIMG.sprintf(_INSTALL_L45, "<b>$key</b>");
             }
         }
         if (isset($this->s_tables['insert'])) {
             foreach($this->s_tables['insert'] as $key => $val){
-                $content .= _OKIMG.sprintf(_INSTALL_L119, $val, "<b>$key</b>")."<br />\n";
+                $reports[] = _OKIMG.sprintf(_INSTALL_L119, $val, "<b>$key</b>");
             }
         }
 		if (isset($this->s_tables['alter'])) {
             foreach($this->s_tables['alter'] as $key => $val){
-                $content .= _OKIMG.sprintf(_INSTALL_L133, "<b>$key</b>")."<br />\n";
+                $reports[] = _OKIMG.sprintf(_INSTALL_L133, "<b>$key</b>");
             }
         }
 		if (isset($this->s_tables['drop'])) {
             foreach($this->s_tables['drop'] as $key => $val){
-                $content .= _OKIMG.sprintf(_INSTALL_L163, "<b>$key</b>")."<br />\n";
+                $reports[] = _OKIMG.sprintf(_INSTALL_L163, "<b>$key</b>");
             }
         }
         $content .= "<br />\n";
         if (isset($this->f_tables['create'])) {
             foreach($this->f_tables['create'] as $key => $val){
-                $content .= _NGIMG.sprintf(_INSTALL_L118, "<b>$key</b>")."<br />\n";
+                $reports[] = _NGIMG.sprintf(_INSTALL_L118, "<b>$key</b>");
             }
         }
         if (isset($this->f_tables['insert'])) {
             foreach($this->f_tables['insert'] as $key => $val){
-                $content .= _NGIMG.sprintf(_INSTALL_L120, $val, "<b>$key</b>")."<br />\n";
+                $reports[] = _NGIMG.sprintf(_INSTALL_L120, $val, "<b>$key</b>");
             }
         }
 		if (isset($this->f_tables['alter'])) {
             foreach($this->f_tables['alter'] as $key => $val){
-                $content .= _NGIMG.sprintf(_INSTALL_L134, "<b>$key</b>")."<br />\n";
+                $reports[] = _NGIMG.sprintf(_INSTALL_L134, "<b>$key</b>");
             }
         }
 		if (isset($this->f_tables['drop'])) {
             foreach($this->f_tables['drop'] as $key => $val){
-                $content .= _NGIMG.sprintf(_INSTALL_L164, "<b>$key</b>")."<br />\n";
+                $reports[] = _NGIMG.sprintf(_INSTALL_L164, "<b>$key</b>");
             }
         }
-        $content .= "</td></tr></table>\n";
-        return $content;
+        return $reports;
     }
 
     function query($sql){
Index: xoops2jp/html/install/class/mainfilemanager.php
diff -u xoops2jp/html/install/class/mainfilemanager.php:1.2 xoops2jp/html/install/class/mainfilemanager.php:1.2.8.1
--- xoops2jp/html/install/class/mainfilemanager.php:1.2	Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/mainfilemanager.php	Tue Mar  7 22:11:39 2006
@@ -28,7 +28,7 @@
 * mainfile manager for XOOPS installer
 *
 * @author Haruki Setoyama  <haruk****@plane*****>
-* @version $Id: mainfilemanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $
+* @version $Id: mainfilemanager.php,v 1.2.8.1 2006/03/07 13:11:39 nobunobu Exp $
 * @access public
 **/
 class mainfile_manager {
@@ -37,7 +37,7 @@
     var $distfile = '../mainfile.dist.php';
     var $rewrite = array();
 
-    var $report = '';
+    var $report =  array();
     var $error = false;
 
     function mainfile_manager(){
@@ -50,11 +50,11 @@
 
     function copyDistFile(){
         if ( ! copy($this->distfile, $this->path) ) {
-            $this->report .= _NGIMG.sprintf(_INSTALL_L126, "<b>".$this->path."</b>")."<br />\n";
+            $this->report[] = _NGIMG.sprintf(_INSTALL_L126, '<b>'.$this->path.'</b>');
             $this->error = true;
             return false;
         }
-        $this->report .= _OKIMG.sprintf(_INSTALL_L125, "<b>".$this->path."</b>", "<b>".$this->distfile."</b>")."<br />\n";
+        $this->report[] = _OKIMG.sprintf(_INSTALL_L125, '<b>'.$this->path.'</b>', '<b>'.$this->distfile.'</b>');
         return true;
     }
 
@@ -73,17 +73,17 @@
                 $content = preg_replace("/(define\()([\"'])(".$key.")\\2,\s*([0-9]+)\s*\)/"
                 , "define('".$key."', ".$val.")"
                 , $content);
-                $this->report .= _OKIMG.sprintf(_INSTALL_L121, "<b>$key</b>", $val)."<br />\n";
+                $this->report[] = _OKIMG.sprintf(_INSTALL_L121, "<b>$key</b>", $val);
             }
             elseif(preg_match("/(define\()([\"'])(".$key.")\\2,\s*([\"'])(.*?)\\4\s*\)/",$content)){
                 $content = preg_replace("/(define\()([\"'])(".$key.")\\2,\s*([\"'])(.*?)\\4\s*\)/"
                 , "define('".$key."', '".addslashes($val)."')"
                 , $content);
-                $this->report .= _OKIMG.sprintf(_INSTALL_L121, "<b>$key</b>", $val)."<br />\n";
+                $this->report[] = _OKIMG.sprintf(_INSTALL_L121, '<b>'.$key.'</b>', $val);
 
             }else{
                 $this->error = true;
-                $this->report .= _NGIMG.sprintf(_INSTALL_L122, "<b>$val</b>")."<br />\n";
+                $this->report[] = _NGIMG.sprintf(_INSTALL_L122, '<b>'.$val.'</b>');
             }
         }
 
@@ -104,10 +104,7 @@
     }
 
     function report(){
-        $content = "<table align='center'><tr><td align='left'>\n";
-        $content .= $this->report;
-        $content .= "</td></tr></table>\n";
-        return $content;
+        return $this->report;
     }
 
     function error(){
Index: xoops2jp/html/install/class/settingmanager.php
diff -u xoops2jp/html/install/class/settingmanager.php:1.2 xoops2jp/html/install/class/settingmanager.php:1.2.8.1
--- xoops2jp/html/install/class/settingmanager.php:1.2	Fri Mar 18 21:52:14 2005
+++ xoops2jp/html/install/class/settingmanager.php	Tue Mar  7 22:11:39 2006
@@ -29,7 +29,7 @@
 * setting manager for XOOPS installer
 *
 * @author Haruki Setoyama  <haruk****@plane*****>
-* @version $Id: settingmanager.php,v 1.2 2005/03/18 12:52:14 onokazu Exp $
+* @version $Id: settingmanager.php,v 1.2.8.1 2006/03/07 13:11:39 nobunobu Exp $
 * @access public
 **/
 class setting_manager {
@@ -57,23 +57,23 @@
             $this->prefix = 'xoops';
             $this->db_pconnect = 0;
 
-            $this->root_path = str_replace("\\","/",getcwd()); // "
-            $this->root_path = str_replace("/install", "", $this->root_path);
+            $this->root_path = str_replace('\\','/',getcwd()); // "
+            $this->root_path = str_replace('/install', '', $this->root_path);
         
             $filepath = (! empty($_SERVER['REQUEST_URI']))
                             ? dirname($_SERVER['REQUEST_URI'])
                             : dirname($_SERVER['SCRIPT_NAME']);
         
-            $filepath = str_replace("\\", "/", $filepath); // "
-            $filepath = str_replace("/install", "", $filepath);
-            if ( substr($filepath, 0, 1) == "/" ) {
+            $filepath = str_replace('\\', '/', $filepath); // "
+            $filepath = str_replace('/install', '', $filepath);
+            if ( substr($filepath, 0, 1) == '/' ) {
                 $filepath = substr($filepath,1);
             }
-            if ( substr($filepath, -1) == "/" ) {
+            if ( substr($filepath, -1) == '/' ) {
                 $filepath = substr($filepath, 0, -1);
             }
             $protocol = ($_SERVER['HTTPS'] == 'on') ? 'https://' : 'http://';
-            $this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST']."/".$filepath : $protocol.$_SERVER['HTTP_HOST'];
+            $this->xoops_url = (!empty($filepath)) ? $protocol.$_SERVER['HTTP_HOST'].'/'.$filepath : $protocol.$_SERVER['HTTP_HOST'];
         }
     }
 
@@ -141,7 +141,7 @@
     
         if (!empty($error)) {
             foreach ( $error as $err ) {
-                $ret .=  "<p><span style='color:#ff0000;'><b>".$err."</b></span></p>\n";
+                $ret .=  '<p><span style="color:#ff0000;"><b>'.$err.'</b></span></p>'."\n";
             }
         }
 
@@ -150,44 +150,44 @@
 
     function editform(){
         $ret =
-            "<table width='100%' class='outer' cellspacing='5'>
+            '<table width="100%" class="outer" cellspacing="5">
                 <tr>
-                    <th colspan='2'></th>
+                    <th colspan="2"></th>
                 </tr>
-                <tr valign='top' align='left'>
-                    <td class='head'>
-                        <b>"._INSTALL_L51."</b><br />
-                        <span style='font-size:85%;'>"._INSTALL_L66."</span>
+                <tr valign="top" align="left">
+                    <td class="head">
+                        <b>'._INSTALL_L51.'</b><br />
+                        <span style="font-size:85%;">'._INSTALL_L66.'</span>
                     </td>
-                    <td class='even'>
-                        <select  size='1' name='database' id='database'>";
+                    <td class="even">
+                        <select  size="1" name="database" id="database">';
         $dblist = $this->getDBList();
         foreach($dblist as $val){
-            $ret .= "<option value='$val'";
-            if($val == $this->database) $ret .= " selected='selected'";
-            $ret .= "'>$val</option>";
+            $ret .= '<option value="'.$val.'"';
+            if($val == $this->database) $ret .= ' selected="selected"';
+            $ret .= '">'.$val.'</option>';
         }
-        $ret .=         "</select>
+        $ret .=         '</select>
                     </td>
                 </tr>
-                ";
+                ';
         $ret .= $this->editform_sub(_INSTALL_L27, _INSTALL_L67, 'dbhost', $this->sanitizer->htmlSpecialChars($this->dbhost));
         $ret .= $this->editform_sub(_INSTALL_L28, _INSTALL_L65, 'dbuname', $this->sanitizer->htmlSpecialChars($this->dbuname));
         $ret .= $this->editform_sub(_INSTALL_L52, _INSTALL_L68, 'dbpass', $this->sanitizer->htmlSpecialChars($this->dbpass));
         $ret .= $this->editform_sub(_INSTALL_L29, _INSTALL_L64, 'dbname', $this->sanitizer->htmlSpecialChars($this->dbname));
         $ret .= $this->editform_sub(_INSTALL_L30, _INSTALL_L63, 'prefix', $this->sanitizer->htmlSpecialChars($this->prefix));
 
-        $ret .= "<tr valign='top' align='left'>
-                    <td class='head'>
-                        <b>"._INSTALL_L54."</b><br />
-                        <span style='font-size:85%;'>"._INSTALL_L69."</span>
+        $ret .= '<tr valign="top" align="left">
+                    <td class="head">
+                        <b>'._INSTALL_L54.'</b><br />
+                        <span style="font-size:85%;">'._INSTALL_L69.'</span>
                     </td>
-                    <td class='even'>
-                        <input type='radio' name='db_pconnect' value='1'".($this->db_pconnect == 1 ? " checked='checked'" : "" )." />"._INSTALL_L23."
-                        <input type='radio' name='db_pconnect' value='0'".($this->db_pconnect != 1 ? " checked='checked'" : "" )." />"._INSTALL_L24."
+                    <td class="even">
+                        <input type="radio" name="db_pconnect" value="1"'.($this->db_pconnect == 1 ? ' checked="checked"' : '' ).' />'._INSTALL_L23.'
+                        <input type="radio" name="db_pconnect" value="0"'.($this->db_pconnect != 1 ? ' checked="checked"' : '' ).' />'._INSTALL_L24.'
                     </td>
                 </tr>
-                ";
+                ';
 
         $ret .= $this->editform_sub(_INSTALL_L55, _INSTALL_L59, 'root_path', $this->sanitizer->htmlSpecialChars($this->root_path));
         $ret .= $this->editform_sub(_INSTALL_L56, _INSTALL_L58, 'xoops_url', $this->sanitizer->htmlSpecialChars($this->xoops_url));
@@ -197,71 +197,71 @@
     }
 
     function editform_sub($title, $desc, $name, $value){
-        return  "<tr valign='top' align='left'>
-                    <td class='head'>
-                        <b>".$title."</b><br />
-                        <span style='font-size:85%;'>".$desc."</span>
+        return  '<tr valign="top" align="left">
+                    <td class="head">
+                        <b>'.$title.'</b><br />
+                        <span style="font-size:85%;">'.$desc.'</span>
                     </td>
-                    <td class='even'>
-                        <input type='text' name='".$name."' id='".$name."' size='30' maxlength='100' value='".htmlspecialchars($value)."' />
+                    <td class="even">
+                        <input type="text" name="'.$name.'" id="'.$name.'" size="30" maxlength="100" value="'.htmlspecialchars($value).'" />
                     </td>
                 </tr>
-                ";
+                ';
     }
 
     function confirmForm(){
         $yesno = empty($this->db_pconnect) ? _INSTALL_L24 : _INSTALL_L23;
         $ret =
-            "<table border='0' cellpadding='0' cellspacing='0' valign='top' width='90%'><tr><td class='bg2'>
-                <table width='100%' border='0' cellpadding='4' cellspacing='1'>
+            '<table border="0" cellpadding="0" cellspacing="0" valign="top" width="90%"><tr><td class="bg2">
+                <table width="100%" border="0" cellpadding="4" cellspacing="1">
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L51."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->database)."</td>
+                        <td class="bg3"><b>'._INSTALL_L51.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->database).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L27."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbhost)."</td>
+                        <td class="bg3"><b>'._INSTALL_L27.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->dbhost).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L28."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbuname)."</td>
+                        <td class="bg3"><b>'._INSTALL_L28.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->dbuname).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L52."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbpass)."</td>
+                        <td class="bg3"><b>'._INSTALL_L52.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->dbpass).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L29."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->dbname)."</td>
+                        <td class="bg3"><b>'._INSTALL_L29.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->dbname).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L30."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->prefix)."</td>
+                        <td class="bg3"><b>'._INSTALL_L30.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->prefix).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L54."</b></td>
-                        <td class='bg1'>".$yesno."</td>
+                        <td class="bg3"><b>'._INSTALL_L54.'</b></td>
+                        <td class="bg1">'.$yesno.'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L55."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->root_path)."</td>
+                        <td class="bg3"><b>'._INSTALL_L55.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->root_path).'</td>
                     </tr>
                     <tr>
-                        <td class='bg3'><b>"._INSTALL_L56."</b></td>
-                        <td class='bg1'>".$this->sanitizer->htmlSpecialChars($this->xoops_url)."</td>
+                        <td class="bg3"><b>'._INSTALL_L56.'</b></td>
+                        <td class="bg1">'.$this->sanitizer->htmlSpecialChars($this->xoops_url).'</td>
                     </tr>
                 </table></td></tr>
             </table>
-            <input type='hidden' name='database' value='".$this->sanitizer->htmlSpecialChars($this->database)."' />
-            <input type='hidden' name='dbhost' value='".$this->sanitizer->htmlSpecialChars($this->dbhost)."' />
-            <input type='hidden' name='dbuname' value='".$this->sanitizer->htmlSpecialChars($this->dbuname)."' />
-            <input type='hidden' name='dbpass' value='".$this->sanitizer->htmlSpecialChars($this->dbpass)."' />
-            <input type='hidden' name='dbname' value='".$this->sanitizer->htmlSpecialChars($this->dbname)."' />
-            <input type='hidden' name='prefix' value='".$this->sanitizer->htmlSpecialChars($this->prefix)."' />
-            <input type='hidden' name='db_pconnect' value='".intval($this->db_pconnect)."' />
-            <input type='hidden' name='root_path' value='".$this->sanitizer->htmlSpecialChars($this->root_path)."' />
-            <input type='hidden' name='xoops_url' value='".$this->sanitizer->htmlSpecialChars($this->xoops_url)."' />
-            ";
+            <input type="hidden" name="database" value="'.$this->sanitizer->htmlSpecialChars($this->database).'" />
+            <input type="hidden" name="dbhost" value="'.$this->sanitizer->htmlSpecialChars($this->dbhost).'" />
+            <input type="hidden" name="dbuname" value="'.$this->sanitizer->htmlSpecialChars($this->dbuname).'" />
+            <input type="hidden" name="dbpass" value="'.$this->sanitizer->htmlSpecialChars($this->dbpass).'" />
+            <input type="hidden" name="dbname" value="'.$this->sanitizer->htmlSpecialChars($this->dbname).'" />
+            <input type="hidden" name="prefix" value="'.$this->sanitizer->htmlSpecialChars($this->prefix).'" />
+            <input type="hidden" name="db_pconnect" value="'.intval($this->db_pconnect).'" />
+            <input type="hidden" name="root_path" value="'.$this->sanitizer->htmlSpecialChars($this->root_path).'" />
+            <input type="hidden" name="xoops_url" value="'.$this->sanitizer->htmlSpecialChars($this->xoops_url).'" />
+            ';
         return $ret;
     }
 
Index: xoops2jp/html/install/class/simplewidzard.php
diff -u /dev/null xoops2jp/html/install/class/simplewidzard.php:1.1.2.1
--- /dev/null	Tue Mar  7 22:11:39 2006
+++ xoops2jp/html/install/class/simplewidzard.php	Tue Mar  7 22:11:39 2006
@@ -0,0 +1,202 @@
+<?php
+class SimpleWidzard {
+  var $_v;
+  var $_op;
+  var $_title;
+  var $_content;
+  var $_next = '';
+  var $_back = '';
+  var $_reload ='';
+  var $_template_path;
+  var $_base_template_name;
+  var $_custom_seq;
+
+    function setTemplatePath($name) {
+        $this->_template_path = $name;
+    }
+
+    function setBaseTemplate($name) {
+        $this->_base_template_name = $name;
+    }
+
+    function assign($name, $value) {
+        $this->_v[$name] = $value;
+    }
+    
+    function setContent($value) {
+        $this->_content = $value;
+    }
+
+    function setOp($value) {
+        $this->_op = $value;
+    }
+
+    function setTitle($value) {
+        $this->_title = $value;
+    }
+
+    function setNext($value) {
+        $this->_next = $value;
+        $this->_custom_seq = true;
+    }
+
+    function setBack($value) {
+        $this->_back = $value;
+        $this->_custom_seq = true;
+    }
+
+    function setReload($value) {
+        $this->_reload = $value;
+        $this->_custom_seq = true;
+    }
+
+    function addArray($name, $value) {
+        if (!isset($this->_v[$name]) || !is_array($this->_v[$name])) {
+            $this->_v[$name] = array();
+        }
+        $this->_v[$name][] = $value;
+    }
+
+    function v($name) {
+        if (!empty($this->_v[$name])) {
+            return $this->_v[$name];
+        } else {
+            return $false;
+        }
+    }
+
+    function e() {
+        $args = func_get_args();
+        if (func_num_args() >0) {
+            if (!empty($this->_v[$args[0]])) {
+                $value = $this->_v[$args[0]];
+                if ((func_num_args() ==2) && is_array($value)) {
+                    $value = $value[$args[1]];
+                }
+            } else {
+                $value = '';
+            }
+            echo $value;
+        }
+    }
+    
+    function render($fname='') {
+        if ($fname && file_exists($this->_template_path.'/'.$fname)) {
+            ob_start();
+            include $this->_template_path.'/'.$fname;
+            $this->setContent(ob_get_contents());
+            ob_end_clean();
+        }
+        $content = $this->_content;
+        if (!empty($this->_title)) {
+            $title = $this->_title;
+        } else {
+            $title = $GLOBALS['widzardSeq']->getTitle($this->_op);
+        }
+        if (!empty($this->_next)) {
+            $b_next = $this->_next;
+        } else if (!$this->_custom_seq) {
+            $b_next = $GLOBALS['widzardSeq']->getNext($this->_op);
+        } else {
+            $b_next = '';
+        }
+        if (!empty($this->_back)) {
+            $b_back = $this->_back;
+        } else if (!$this->_custom_seq) {
+            $b_back = $GLOBALS['widzardSeq']->getBack($this->_op);
+        } else {
+            $b_back = '';
+        }
+        if (!empty($this->_reload)) {
+            $b_reload = $this->_reload;
+        } else if (!$this->_custom_seq) {
+            $b_reload = $GLOBALS['widzardSeq']->getReload($this->_op);
+        } else {
+            $b_reload = '';
+        }
+        include $this->_base_template_name;
+    }
+    function error() {
+        $content = $this->_content;
+        if (!empty($this->_title)) {
+            $title = $this->_title;
+        } else {
+            $title = $GLOBALS['widzardSeq']->getTitle($this->_op);
+        }
+        if (!empty($this->_next)) {
+            $b_next = $this->_next;
+        } else {
+            $b_next = '';
+        }
+        if (!empty($this->_back)) {
+            $b_back = $this->_back;
+        } else {
+            $b_back = '';
+        }
+        if (!empty($this->_reload)) {
+            $b_reload = $this->_reload;
+        } else {
+            $b_reload = '';
+        }
+        include $this->_base_template_name;
+    }
+}
+
+class SimpleWidzardSequence {
+  var $_list;
+  
+    function add($name, $title='', $next='', $next_btn='', $back='', $back_btn='', $reload='') {
+        $this->_list[$name]['title'] = $title;
+        $this->_list[$name]['next'] = $next;
+        $this->_list[$name]['next_btn'] = $next_btn;
+        $this->_list[$name]['back'] = $back;
+        $this->_list[$name]['back_btn'] = $back_btn;
+        $this->_list[$name]['reload'] = $reload;
+    }
+    
+    function insertAfter($after, $name, $title='', $back='', $back_btn='', $reload='') {
+        if (!empty($this->_list[$after])) {
+            $this->_list[$name]['title'] = $title;
+            $this->_list[$name]['next'] = $this->_list[$after]['next'];
+            $this->_list[$name]['next_btn'] = $this->_list[$after]['next_btn'];
+            $this->_list[$after]['next'] = $name;
+            $this->_list[$after]['next_btn'] = $title;
+            $this->_list[$name]['back'] = $back;
+            $this->_list[$name]['back_btn'] = $back_btn;
+            $this->_list[$name]['reload'] = $reload;
+        }
+    }
+
+    function getTitle($name) {
+        if (!empty($this->_list[$name]['title'])) {
+            return($this->_list[$name]['title']);
+        } else {
+            return '';
+        }
+    }
+
+    function getNext($name) {
+        if (!empty($this->_list[$name]['next'])||!empty($this->_list[$name]['next_btn'])) {
+            return(array($this->_list[$name]['next'],$this->_list[$name]['next_btn']));
+        } else {
+            return '';
+        }
+    }
+
+    function getBack($name) {
+        if (!empty($this->_list[$name]['back'])||!empty($this->_list[$name]['back_btn'])) {
+            return(array($this->_list[$name]['back'],$this->_list[$name]['back_btn']));
+        } else {
+            return '';
+        }
+    }
+
+    function getReload($name) {
+        if (!empty($this->_list[$name]['reload'])) {
+            return($this->_list[$name]['reload']);
+        } else {
+            return '';
+        }
+    }
+}
+


xoops-cvslog メーリングリストの案内
Back to archive index