Location: PHPKode > projects > Caleb's Code > Cafe_Cart/install/install.php
<?php

include "modules/$ModName/install/install_cfg.php";
function default_output() {
   global $ModName, $install;
   echo "   <center>\n"
       ."   <iframe src=\"$install[lic_url]\" width=100% height=500px>\n"
       ."    <a href=\"$install[lic_url]\">Please read licence</a>\n"
       ."   </iframe>\n"
       ."   <br><br>\n"
       ."   $install[lic_msg]\n"
       ."   <form action=\"admin.php\" method=\"post\">\n"
       ."    <input type=hidden name=op value=install_$ModName>\n"
       ."    <input type=hidden name=istop value=agree>\n"
       ."    <input type=submit value=\"I AGREE\">\n"
       ."   </form>\n"
       ."   </center>\n";
   }
function warning_output() {
   global $ModName, $install;
   echo "   <b>Table Setup</b><br>\n"
       ."   $install[wrn_msg]<br>\n"
       ."   <form action=\"admin.php\" method=\"post\">\n"
       ."    <input type=hidden name=op value=install_$ModName>\n"
       ."    <input type=hidden name=istop value=table_setup>\n";
   foreach ($install[options] as $key => $text) {
      if (!$first) {
         echo "    <input type=radio name=execute value=$key CHECKED> $text<br>\n";
         $first = true;
         }
      else echo "    <input type=radio name=execute value=$key> $text<br>\n";
      }
   echo "    <br><br>\n"
       ."    <input type=submit value=\"Continue\">\n"
       ."   </form>";
   }
function do_tables($execute) {
   global $install_tables, $ModName, $install, $pnconfig;
   echo "<b>Setting up tables:</b><ul>\n";
   include "modules/$ModName/install/".$execute.".php";
   echo "</ul>\n"
       ."   If everything completed successfully you are now ready to run the config for the first time.<br>\n"
       ."   <br>\n"
       ."   <a href=\"admin.php?op=$install[adm_op]\">Click to continue</a>.";
   }
   
// start switching
include "header.php";
OpenTable();
echo "   <h3><img src=\"$install[inst_img]\" align=right>$install[inst_tit]</h3>\n"
    ."   $install[inst_msg]<br><br>\n";

switch($istop) {
   case 'table_setup':
      do_tables($execute);
      break;
   case 'agree':
      warning_output();
      break;
   default:
      default_output();
      break;
   }

CloseTable();
echo "<br>";
include "footer.php";

?>
Return current item: Caleb's Code