Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
action_copy_file_to_mysql.php
Package: Generateur_v13.rar [view]
Upload User: feiyaoda
Upload Date: 2016-11-21
Package Size: 9556k
Code Size: 3k
Category:
WEB Mail
Development Platform:
PHP
- <?php
- include('./pat_mysql_connect.php');
- include('./extensions/pat_db_install.php');
- if (FALSE == count($buffer_copy_files))
- {
- die ($get_string->get('no_file_to_execute'));
- }
- mysql_select_db($target_folder); echo mysql_error();
- echo "<p class="big_text">".$get_string->get('execute_queries_from_file')." $source_folder</p>n";
- // Registering variable
- if (isset($_POST['execute_query']))
- {
- if (0 != count($_POST['execute_query']))
- $execute_query = $_POST['execute_query'];
- else
- $execute_query = FALSE;
- }
- else
- {
- $execute_query = FALSE;
- }
- if (isset($_POST['execute_file']))
- {
- if (0 != count($_POST['execute_file']))
- $execute_file = $_POST['execute_file'];
- else
- $execute_file = FALSE;
- }
- else
- {
- $execute_file = FALSE;
- }
- if ((FALSE != $execute_query) && (FALSE != $execute_file))
- {
- foreach ($execute_file as $urlenc_path => $istrue)
- {
- $ok = 0;
- $path = urldecode($urlenc_path);
- echo "executing file $path<br>n";
- $sql = new sql_instructions();
- //$sql->show_parse = true;
- $sql->parse_file($path);
- $instructions = $sql->get_instructions();
- $i=1;
- foreach($instructions as $id => $value)
- {
- if (FALSE == mysql_query(trim($value)))
- echo "ERROR for query $i ".mysql_error()." <a href="pat_sql_view.php?path=$path&highlight=$i#q$i">View Query</a><br>n";
- else $ok++;
- $i++;
- }
- echo sprintf($get_string->get('queries_correctly_executed'),$ok);
- }
- }
- else
- {
- /*
- * SELECTION OF SQL SOURCE AND INSTRUCTIONS TO PERFORM
- *
- */
- echo "<form action=execute.php method=POST>n";
- migrate_across_request();
- echo "<b>".$get_string->get('select_file_to_execute')."</b><br><br>n";
- foreach ($buffer_copy_files as $id => $path)
- {
- list(,$ext) = extract_file_parts(basename($path));
- if ('sql' == $ext) $is_checked = ' checked';
- else $is_checked = '';
- echo "<input type=checkbox name=execute_file[".urlencode($path)."] value="1"$is_checked>$path<br>n";
- }
- echo "<br>n";
- echo "<b>".$get_string->get('sql_queries_to_execute')."</b><br><br>n";
- echo "<input type=checkbox name=execute_query[drop] value="1" checked>drop<br>n";
- echo "<input type=checkbox name=execute_query[insert] value="1" checked>insert<br>n";
- echo "<input type=checkbox name=execute_query[update] value="1" checked>update<br>n";
- echo "<input type=checkbox name=execute_query[delete] value="1" checked>delete<br>n";
- echo "<br>n";
- echo "<input type=submit name="submit" value=">".$get_string->get('execute')."<"><br>n";
- echo "<form>n";
- }