DonatShell
Server IP : 180.180.241.3  /  Your IP : 216.73.216.252
Web Server : Microsoft-IIS/7.5
System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586
User : IUSR ( 0)
PHP Version : 5.3.28
Disable Function : NONE
MySQL : ON  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/modules/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : C:/Program Files (x86)/MySQL/MySQL Workbench 6.1 CE/modules/code_utils_grt.pyc
ó
,¢2Sc@s2ddlmZmZddlZddlZddlmZmZmZm	Z	m
Z
mZmZm
Z
mZedddddd	ƒZejd
ddd
ejƒgddƒejejejjƒd„ƒƒZd„Zejdddd
ejƒgddƒejejejjƒd„ƒƒZdS(iÿÿÿÿ(tDefineModuletwbinputsN(	t
node_valuetnode_symbolt
node_childrentfind_child_nodetfind_child_nodesttrim_astt	ASTHelpert	dump_treetflatten_nodetnamet	CodeUtilstauthorsOracle Corp.tversions1.0swb.sqlide.copyAsPHPConnecttcaptions$Copy as PHP Code (Connect to Server)tinputt
pluginMenus
SQL/UtilitiescCsì|jrè|j}|jjdkraidd6dd6|jdd6|jdd6|jd	6}nTi|jd
d6|jdrŒ|jdndd6|jdd6dd6|jd	6}d|}tjj|ƒtjj	ƒj
d
ƒndS(sPCopies PHP code to connect to the active MySQL connection to the clipboard.
    tMysqlNativeSocketsp:localhostthostiêtporttuserNametusertsockettdbnamethostNamets$host="%(host)s";
$port=%(port)s;
$socket="%(socket)s";
$user="%(user)s";
$password="";
$dbname="%(dbname)s";

$con = new mysqli($host, $user, $password, $dbname, $port, $socket)
	or die ('Could not connect to the database server' . mysqli_connect_error());

//$con->close();
sCopied PHP code to clipboardi(t
connectiontdriverRtparameterValuest
defaultSchematmformst	Utilitiestset_clipboard_texttApptgettset_status_text(teditortconntparamsttext((sMC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\code_utils_grt.pytcopyAsPHPConnects&		!

cCsöddlm}|j|ƒ}xÐ|D]È}t|ƒtkrDq&q&|\}}}}}}	t|ƒ}
t|
dƒ}|r&g}g}
d}x"t|ƒD]}t|ƒdkrœtt|dƒdƒ}|s”t|dƒ}|rt	t|ƒƒd	krt|ƒd}ntt|d
ƒdƒ}|r?t
|ƒ}q d}t|ƒ}|r ddl}|j
d|ƒ}|r‘|jƒd}q‘q nt
|ƒ}|j|ƒqœqœWt|ƒ}|j|ƒ\}}|||!}|}t|d
ƒ}xpt|ƒD]b}|j|ƒ\}}||8}||8}|||!}|| d||}|
jd|ƒqWi}xnt|ƒD]`\}}|j|ƒrÃd|||f||<||cd7<n|j|dƒd||<q}W|||
fSq&WdS(Niÿÿÿÿ(tMysqlSqlFacadetselect_item_listitselect_itemtselect_aliastidenttsimple_ident_qitexprtfields([a-zA-Z0-9_]*)tvariablet?s%s%ii(tgrt.modulesR*tparseAstFromSqlScriptttypetstrRRRRtlenRR
tretmatchtgroupstappendRt
get_ast_rangeRtreversedtinsertt	enumeratethas_keyR#(tqueryR*tast_listtasttstvtct_baset_begint_endttrimmed_astR+tcolumnst	variablestindextnodetaliasR.RR1R9tmthelpertbegintendtoffsettvarstvart
duplicatesti((sMC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\code_utils_grt.pyt"_parse_column_name_list_from_query8sd




s wb.sqlide.copyAsPHPQueryAndFetchs)Copy as PHP Code (Iterate SELECT Results)c
	Cs±|jp|j}t|ƒ}|r6|\}}}nd}d}|jddƒjddƒjƒ}|jdƒr‚|d }nd}d}|rdjg|D]}d|d^q¡ƒd}d	d
t|ƒdjg|D]}d|d^q߃f}n|sd
dg}ndi|jddƒd6djg|D]}d|^q>ƒd6djdgt|ƒƒd6|d6|d6}	t	j
j|	ƒt	jj
ƒjdƒdS(s"Copies PHP code to execute the query and iterate its results to the clipboard. The code will substitute @variables with
parameter markers (?) and will bind them with matching PHP variables. The results will be bound to PHP variables matching
the SELECTed column names or their aliases.
    s
t s
t;iÿÿÿÿRs	$%s = '';is]$stmt->bind_param('%s', %s); //FIXME: param types: s- string, i- integer, d- double, b- blob
REs, t$tfield1tfield2sý$query = "%(query)s";
%(vars)s
%(var_bind)s
if ($stmt = $con->prepare($query)) {
    $stmt->execute();
    $stmt->bind_result(%(column_list)s);
    while ($stmt->fetch()) {
        //printf("%(fmt_list)s\n", %(column_list)s);
    }
    $stmt->close();
}t"s\"RBs$%stcolumn_lists%stfmt_listRVtvar_bindsCopied PHP code to clipboardiN(tselectedTexttscriptRZtNonetreplacetstriptendswithtjoinR8RR R!R"R#R$(
tqbuffertsqltrestcolumn_namestvariable_namestvariable_assignmentst
variable_bindRWRGR(((sMC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\code_utils_grt.pytcopyAsPHPQueryAndFetchys.$
.AD(twbRRtgrtRtsql_reformatterRRRRRRRR	R
t
ModuleInfotplugintcurrentSQLEditortexporttINTtclassestdb_query_EditorR)RZtcurrentQueryBuffertdb_query_QueryBufferRr(((sMC:\Program Files (x86)\MySQL\MySQL Workbench 6.1 CE\modules\code_utils_grt.pyt<module>s@'')	A'

Anon7 - 2022
AnonSec Team