⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 uninstall.php

📁 具有多種面版可以選擇的"投票程式" 多國語言版
💻 PHP
📖 第 1 页 / 共 2 页
字号:
global $PHP_SELF, $version, $img_loc;
global $POLLTBL;
global $db_name, $mysql_host, $mysql_user, $mysql_pass;
?>
<body bgcolor="#3A6EA5">
<br>
<br>
<table border="1" cellspacing="0" cellpadding="0" align="center" width="500">
  <tr bgcolor="#C6C3C6">
    <td>
      <table width="500" border="0" cellspacing="0" cellpadding="1" align="center">
        <tr bgcolor="#400080">
          <td height="20" class="td1" bgcolor="#000084"><b><font color="#FFFFFF">
            &nbsp;Advanced Poll <?php echo $version; ?> Uninstall</font></b></td>
          <td height="20" class="td1" align="right" bgcolor="#000084"><img src="<?php echo $img_loc; ?>/cross.gif" width="16" height="14" border="0" usemap="#close"><map name="close"><area shape="rect" coords="1,1,14,12" href="javascript:abort()"></map>
          </td>
        </tr>
        <tr align="center">
          <td colspan="2">
            <form method="post" action="<?php echo $PHP_SELF; ?>">
              <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
                <tr bgcolor="#FFFFFF" valign="bottom">
                  <td class="td1" height="30"><b>&nbsp;&nbsp;&nbsp;&nbsp;Connection
                    established</b></td>
                </tr>
                <tr bgcolor="#FFFFFF">
                  <td class="td1" height="30">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    <?php echo "$mysql_user"."@"."$mysql_host"; ?></td>
                </tr>
                <tr bgcolor="#C6C3C6">
                  <td class="td1" align="center">
                    <table width="400" border="0" cellspacing="0" cellpadding="0" align="center">
                      <tr>
                        <td class="td1" height="75">Are you sure you want to remove
                          the following tables from your database?</td>
                      </tr>
                      <tr>
                        <td height="140" class="td1" valign="top">
                          <table width="100%" border="0" cellspacing="0" cellpadding="1">
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_index"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_data"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_config"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_ip"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_log"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_comment"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_tpl"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_tplset"]; ?></td>
                            </tr>
                            <tr>
                              <td class="td1">- <?php echo $POLLTBL["poll_user"]; ?></td>
                                <input type="hidden" name="db_name" value="<?php echo $db_name; ?>">
                                <input type="hidden" name="mysql_host" value="<?php echo $mysql_host; ?>">
                                <input type="hidden" name="mysql_user" value="<?php echo $mysql_user; ?>">
                                <input type="hidden" name="mysql_pass" value="<?php echo $mysql_pass; ?>">
                                <input type="hidden" name="action" value="delete">
                              </td>
                            </tr>
                          </table>
                        </td>
                      </tr>
                    </table>
                  </td>
                </tr>
                <tr bgcolor="#C6C3C6">
                  <td align="center" height="20">
                    <img src="<?php echo $img_loc; ?>/h_line.gif" height="18" width="490">
                  </td>
                </tr>
                <tr bgcolor="#C6C3C6">
                  <td align="right"><img src="<?php echo $img_loc; ?>/disabled.gif" width="75" height="22" border="0" alt="Back"><input type="image" src="<?php echo $img_loc; ?>/next.gif" width="75" height="22" border="0" alt="Next">
                    &nbsp;&nbsp;<img src="<?php echo $img_loc; ?>/cancel.gif" width="75" height="22" usemap="#Cancel" border="0" alt="Cancel"><map name="Cancel"><area shape="rect" coords="1,1,73,20" href="javascript:abort()"></map>
                    &nbsp;&nbsp; </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<br>
<br>
</body>
</html>
<?php
}

function message_box($msg) {
global $version, $img_loc;
?>
<body bgcolor="#3A6EA5">
<br><br><br><br><br><br>
<table border="1" cellspacing="0" cellpadding="0" align="center" width="300">
  <tr bgcolor="#C6C3C6">
    <td>
      <table width="300" border="0" cellspacing="0" cellpadding="1" align="center">
        <tr bgcolor="#400080">
          <td height="20" class="td1" bgcolor="#000084"><b><font color="#FFFFFF">
            &nbsp;Advanced Poll <?php echo $version; ?> Uninstall</font></b></td>
          <td height="20" class="td1" align="right" bgcolor="#000084"><img src="<?php echo $img_loc; ?>/cross.gif" width="16" height="14" border="0">
          </td>
        </tr>
        <tr align="center">
          <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
              <tr bgcolor="#C6C3C6">
                <td align="center" height="75" width="20%"><img src="<?php echo $img_loc; ?>/info.gif" width="35" height="35"></td>
                <td align="left" height="75" width="80%" class="td1"><?php echo $msg; ?></td>
              </tr>
              <tr bgcolor="#C6C3C6" align="center">
                <td colspan="2" height="40"><img src="<?php echo $img_loc; ?>/disabled.gif" width="75" height="22" border="0" alt="Back">&nbsp;&nbsp;<img src="<?php echo $img_loc; ?>/ok.gif" width="75" height="22" border="0" alt="Ok"></td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<br>
<br>
<br>
</body>
</html>
<?php
exit();
}

if (!isset($action)) {
  $action ='';
}

switch ($action) {

case "cancel":
  print_header();
  message_box("The operation has been cancelled!");
  break;

case "connect":
  print_header(); 
  if (file_exists("../include/config.inc.php")) {
    include ("../include/config.inc.php");
    include "../include/$POLLDB[class]";
  } elseif (file_exists("./include/config.inc.php")) {
    include ("./include/config.inc.php");
    include "./include/$POLLDB[class]";
  } else {
    message_box("Cannot find the configuration file <u>config.inc.php</u>.");
  }
  if (empty($POLLTBL["poll_index"]) || empty($POLLTBL["poll_data"]) || empty($POLLTBL["poll_config"]) || empty($POLLTBL["poll_ip"]) || empty($POLLTBL["poll_log"]) || empty($POLLTBL["poll_user"]) || empty($POLLTBL["poll_comment"])) {
    message_box("Some tables are not defined. Please check the configuration file.");
  }
  $POLLDB["dbName"] = $db_name;
  $POLLDB["host"]   = $mysql_host;
  $POLLDB["user"]   = $mysql_user;
  $POLLDB["pass"]   = $mysql_pass;
  $poll_db = new polldb_sql();
  $poll_db->connect();  
  confirm_uninstall();
  break;

case "delete":
  print_header();
  if (file_exists("../include/config.inc.php")) {
    include ("../include/config.inc.php");
    include "../include/$POLLDB[class]";
  } elseif (file_exists("./include/config.inc.php")) {
    include ("./include/config.inc.php");
    include "./include/$POLLDB[class]";
  } else {
    message_box("Cannot find the configuration file <u>config.inc.php</u>.");
  }
  $POLLDB["dbName"] = $db_name;
  $POLLDB["host"]   = $mysql_host;
  $POLLDB["user"]   = $mysql_user;
  $POLLDB["pass"]   = $mysql_pass;
  $poll_db = new polldb_sql();
  $poll_db->connect();  

  for (reset($POLLTBL); $key=key($POLLTBL); next($POLLTBL)) {
    $poll_db->query("DROP TABLE $POLLTBL[$key]");
  }

  if (ereg("class_pgsql",$POLLDB["class"])) {
    $poll_db->query("DROP SEQUENCE poll_comment_seq");
    $poll_db->query("DROP SEQUENCE poll_index_seq");
    $poll_db->query("DROP SEQUENCE poll_templateset_seq");
    $poll_db->query("DROP SEQUENCE poll_data_seq");
    $poll_db->query("DROP SEQUENCE poll_templates_seq");
  }
  
  message_box("The tables have been removed from your database!");
  break;

default:
  print_header();
  db_config();
  break;

}

?>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -