2022-11-02 23:21:46 +08:00
<!-- {template common/header_simple_start} -->
< script src = "admin/scripts/admin.js?{VERHASH}" > < / script >
<!-- {template common/header_simple_end} -->
<!-- {template common/commer_header} -->
< div class = "bs-container clearfix" >
< div class = "bs-left-container clearfix" >
<!-- {template left} -->
< / div >
< div class = "left-drager" >
< / div >
< div class = "bs-main-container clearfix" >
< div class = "main-header clearfix" >
2023-08-20 15:03:36 +08:00
< ul class = "nav nav-pills" >
< li class = "nav-item" >
< a class = "nav-link <!--{if $operation=='export' }-->active<!--{/if}-->" hidefocus = "true" href = "{MOD_URL}&op=database&operation=export" > {lang export}< / a >
2022-11-02 23:21:46 +08:00
< / li >
2023-08-20 15:03:36 +08:00
< li class = "nav-item" >
< a class = "nav-link <!--{if $operation=='import' }-->active<!--{/if}-->" hidefocus = "true" href = "{MOD_URL}&op=database&operation=import" > {lang nav_db_import}< / a >
2022-11-02 23:21:46 +08:00
< / li >
2023-08-20 15:03:36 +08:00
< li class = "nav-item" >
< a class = "nav-link <!--{if $operation=='runquery' }-->active<!--{/if}-->" hidefocus = "true" href = "{MOD_URL}&op=database&operation=runquery" > {lang nav_db_runquery}< / a >
2022-11-02 23:21:46 +08:00
< / li >
< / ul >
< / div >
2023-08-20 15:03:36 +08:00
< div class = "main-content" >
<!-- {if $operation=='export'} -->
< ul class = "help-block" >
< h5 > {lang board_message}< / h5 > {lang db_export_tips}
< / ul >
<!-- {if !$submit} -->
< form id = "cpform" action = "{MOD_URL}&op=database&operation=export&setup=1" class = "form-horizontal form-horizontal-left" method = "post" name = "cpform" >
< input type = "hidden" value = "{FORMHASH}" name = "formhash" >
< input type = "hidden" value = "true" name = "exportsubmit" >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_type}< / label >
< div class = "col-sm-10" >
< div class = "form-check form-check-inline" >
< input class = "form-check-input" type = "radio" id = "type1" name = "type" value = "dzz" checked = "" onclick = "document.getElementById('showtables').style.display = 'none';" > {lang all_data_table}< / label >
< / div >
< div class = "form-check form-check-inline" >
< input class = "form-check-input" type = "radio" id = "type2" name = "type" value = "custom" onclick = "document.getElementById('showtables').style.display = '';" > {lang db_export_custom}< / label >
< / div >
< / div >
< div id = "showtables" class = "col-sm-10" style = "display:none;border:1px solid #D2D2D2;border-radius: .5rem;" >
< div class = "form-check" >
< input class = "form-check-input" type = "checkbox" class = "form-check-input" name = "chkall" onclick = "checkAll('prefix', this.form, 'customtables', 'chkall', true)" checked = "checked" type = "checkbox" id = "chkalltables" >
< label class = "form-check-label" for = "chkalltables" > {lang check_all_data_table}< / label >
< / div >
< ul class = "list-unstyled" >
<!-- {loop $dztables $value} -->
< li class = "col-xs-4" >
< div class = "form-check" >
< input class = "form-check-input" type = "checkbox" class = "form-check-input" name = "customtables[]" value = "$value" id = "$value" checked = "checked" >
< label class = "form-check-label" for = "$value" > $value< / label >
< / div >
< / li >
<!-- {/loop} -->
< / ul >
< / div >
< / div >
< div id = "advanceoption" style = "display:none" >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_method}< / label >
< div class = "col-sm-10" > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "method" value = "shell" onclick = "if('0') {if(this.form.sqlcompat[2].checked==true) this.form.sqlcompat[0].checked=true; this.form.sqlcompat[2].disabled=true; this.form.sizelimit.disabled=true;} else {this.form.sqlcharset[0].checked=true; for(var i=1; i<=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=true;}}" id = "method_shell" > {lang db_export_shell}< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "method" value = "multivol" checked = "checked" onclick = "this.form.sqlcompat[2].disabled=false; this.form.sizelimit.disabled=false; for(var i=1; i<=5; i++) {if(this.form.sqlcharset[i]) this.form.sqlcharset[i].disabled=false;}" id = "method_multivol" > {lang db_export_multivol}< / label >
2023-09-09 20:43:08 +08:00
< input type = "text" class = "form-control" style = "width:50px;" name = "sizelimit" value = "2048" >
2023-08-20 15:03:36 +08:00
< / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_options_extended_insert}< / label >
< div class = "col-sm-10" >
< label class = "radio radio-inline" >
< input type = "radio" class = "form-check-input" name = "extendins" value = "1" > {lang yes}< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "extendins" value = "0" checked = "checked" > {lang no}< / label > < / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_options_sql_compatible}< / label >
< div class = "col-sm-10" > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "sqlcompat" value = "" checked = "" > {lang default}< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "sqlcompat" value = "MYSQL40" > MySQL 3.23/4.0.x< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "sqlcompat" value = "MYSQL41" disabled = "" > MySQL 4.1.x/5.x< / label > < / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_options_charset}< / label >
< div class = "col-sm-10" > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "sqlcharset" value = "" > {lang db_export_options_charset}< / label >
< label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "sqlcharset" value = "utf8" > UTF8< / label > < / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_usehex}< / label >
< div class = "col-sm-10" > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "usehex" value = "1" checked = "checked" > {lang yes}< / label >
< label class = "radio radio-inline" > < input type = "radio" name = "usehex" value = "0" > {lang no}< / label > < / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_usezip}< / label >
< div class = "col-sm-10" > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "usezip" value = "1" > {lang db_export_zip_1}< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "usezip" value = "2" > {lang db_export_zip_2}< / label > < label class = "radio radio-inline" > < input type = "radio" class = "form-check-input" name = "usezip" value = "0" checked > {lang db_export_zip_3}< / label > < / div >
< / div >
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_export_filename}< / label >
< div class = "col-sm-10" > < input type = "text" class = "form-control" class = "form-check-input" name = "filename" value = "$defaultfilename" > < / div >
< / div >
< / div >
< dl >
< button type = "submit" class = "btn btn-primary" name = "exportsubmit" value = "true" > {lang blank_submit}< / button >
< div class = "form-check" >
< input type = "checkbox" class = "form-check-input" value = "1" onclick = "document.getElementById('advanceoption').style.display = document.getElementById('advanceoption').style.display == 'none' ? '' : 'none'; this.value = this.value == 1 ? 0 : 1; this.checked = this.value == 1 ? false : true" id = "btn_more" >
2023-09-09 20:43:08 +08:00
< label class = "form-check-label" for = "btn_more" > {lang more_options}< / label >
2023-08-20 15:03:36 +08:00
< / div >
< / dl >
< / form >
<!-- {else} -->
< div class = "well" >
<!-- {if $msg} -->
< p class = "$msg_type" > $msg< / p >
<!-- {/if} -->
<!-- {if $redirecturl} -->
< p class = "text-info" >
< a href = "{$redirecturl}" class = "lightlink" > {lang message_redirect}< / a >
< / p >
< script type = "text/JavaScript" > setTimeout ( function ( ) { location . href = '{$redirecturl}' ; } , 2000 ) ; < / script >
<!-- {/if} -->
< / div >
<!-- {/if} -->
<!-- {elseif $operation=='import'} -->
<!-- {if $msg} -->
2022-11-02 23:21:46 +08:00
< div class = "well" >
< p class = "$msg_type" > $msg< / p >
<!-- {if $redirecturl} -->
< p class = "text-info" >
< a href = "{$redirecturl}" class = "lightlink" > {lang message_redirect}< / a >
< / p >
< script type = "text/JavaScript" > setTimeout ( function ( ) { location . href = '{$redirecturl}' ; } , 2000 ) ; < / script >
<!-- {/if} -->
< / div >
<!-- {else} -->
< ul class = "help-block" >
< h5 > {lang board_message}< / h5 > {lang db_import_tips}
< / ul >
$do_import_option
< form id = "cpform" action = "{MOD_URL}&op=database&operation=import" class = "form-horizontal form-horizontal-left " method = "post" name = "cpform" >
< input type = "hidden" value = "{FORMHASH}" name = "formhash" >
< input type = "hidden" value = "true" name = "deletesubmit" >
2023-09-09 20:43:08 +08:00
< table class = "table table-hover" style = "border-top:1px solid #DDD" >
2022-11-02 23:21:46 +08:00
< thead >
< th > < / th >
< th > {lang filename}< / th >
< th > {lang version}< / th >
< th > {lang time}< / th >
< th > {lang type}< / th >
< th > {lang big_small}< / th >
< th > {lang db_method}< / th >
< th > {lang db_volume}< / th >
< th > < / th >
< / thead >
<!-- {loop $list $key $val} -->
< tr >
2023-08-20 15:03:36 +08:00
< td > < input type = "checkbox" class = "form-check-input" name = "delete[]" value = "$key" > < / td >
2022-11-02 23:21:46 +08:00
< td >
<!-- {if $val['list']} -->
< a href = "javascript:;" onclick = "jQuery('#exportlog_{$key}').toggle()" > $key< / a >
<!-- {else} -->
< a href = "$val[filename]" > $key< / a >
<!-- {/if} -->
< / td >
< td > $val[version]< / td >
< td > $val[dateline]< / td >
< td > $val[ftype]< / td >
< td > $val[size]< / td >
< td > $val[method]< / td >
< td > $val[volume]< / td >
< td >
<!-- {if $val['list']} -->
< a href = "{$datasiteurl}restore.php?operation=import&from=server&datafile_server=$val[datafile_server]&importsubmit=yes" < ! -- { if $ info [ ' version ' ] ! = $ _G [ ' setting ' ] [ ' version ' ] } -- > onclick="return confirm('{lang db_import_confirm}');"<!-- {else} --> onclick="return confirm('{lang db_import_confirm_sql}');"<!-- {/if} --> target="_blank">{lang import}< / a >
<!-- {else} -->
< a href = "{$datasiteurl}restore.php?operation=importzip&datafile_server=$info[datafile_server]&importsubmit=yes" onclick = "return confirm('{lang db_import_confirm_zip}');" target = "_blank" > {lang db_import_unzip}< / a >
<!-- {/if} -->
< / td >
< / tr >
< thead id = "exportlog_{$key}" style = "display:none;" >
<!-- {loop $val[list] $key1 $val1} -->
< tr >
< td > < / td >
< td >
< a href = "$val1[filename]" > $val1[filename]< / a >
< / td >
< td > $val1[version]< / td >
< td > $val1[dateline]< / td >
< td > < / td >
< td > $val1[size]< / td >
< td > < / td >
< td > $val1[volume]< / td >
< td > < / td >
< / tr >
<!-- {/loop} -->
< / thead >
<!-- {/loop} -->
< thead >
< tr >
2023-08-20 15:03:36 +08:00
< td colspan = "15" > < input type = "checkbox" class = "form-check-input" name = "chkall" id = "chkallspKI" onclick = "checkAll('prefix', this.form, 'delete')" > {lang del} < button type = "submit" class = "btn btn-primary" name = "exportsubmit" value = "true" > {lang blank_submit}< / button >
2022-11-02 23:21:46 +08:00
< / td >
< / tr >
< / thead >
< / table >
< / form >
<!-- {/if} -->
2023-08-20 15:03:36 +08:00
<!-- {elseif $operation=='runquery'} -->
2022-11-02 23:21:46 +08:00
< ul class = "help-block" >
< h4 > {lang board_message}< / h4 >
{lang db_runquery_tips}
< / ul >
<!-- {if $msg} -->
< div class = "well" >
< p class = "$msg_type" > $msg< / p >
<!-- {if $redirecturl} -->
< p class = "text-info" >
< a href = "{$redirecturl}" class = "lightlink" > {lang message_redirect}< / a >
< / p >
< script type = "text/JavaScript" > setTimeout ( function ( ) { location . href = '{$redirecturl}' ; } , 5000 ) ; < / script >
<!-- {/if} -->
< / div >
<!-- {else} -->
< form id = "cpform" action = "{MOD_URL}&op=database&operation=runquery" method = "post" name = "cpform" >
< input type = "hidden" value = "{FORMHASH}" name = "formhash" >
< input type = "hidden" value = "true" name = "sqlsubmit" >
2023-08-20 15:03:36 +08:00
< div class = "row mb-3" >
< label class = "col-sm-2" > {lang db_runquery_sql}< / label >
< div class = "col-sm-10" > < textarea cols = "85" rows = "10" name = "queries" style = "width:500px;" > < / textarea > < / div >
< div class = "col-sm-10" > < label class = "checkbox-inline" > < input class = "form-check-input" name = "createcompatible" type = "checkbox" value = "1" checked = "checked" / > {lang db_runquery_createcompatible}< / label > < / div >
< / div >
2022-11-02 23:21:46 +08:00
< dl >
2023-08-20 15:03:36 +08:00
< div class = "col-sm-10" > < button type = "submit" class = "btn btn-primary" > {lang blank_submit}< / button > < / div >
2022-11-02 23:21:46 +08:00
< / dl >
< / form >
<!-- {/if} -->
2023-08-20 15:03:36 +08:00
<!-- {/if} -->
< / div >
< / div >
2022-11-02 23:21:46 +08:00
< / div >
<!-- {template common/footer_simple} -->