Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php goto VRYAx; oy8KA: function update_diavouleusi_status($diav_id) { $post = get..
Decoded Output download
<?php
goto VRYAx;
oy8KA:
function update_diavouleusi_status($diav_id)
{
$post = get_post($diav_id);
$val = null;
if ($post->post_status == "draft") {
$val = "Draft";
} else {
$curr_time = current_time("Y-m-d H:i:s");
$start_date = date("Y-m-d H:i:s", strtotime(get_field("start_date", $diav_id)));
$end_date = date("Y-m-d H:i:s", strtotime(get_field("end_date", $diav_id)));
if ($start_date > $curr_time) {
$val = "Scheduled";
} else {
if ($end_date > $curr_time) {
$val = "Active";
} else {
$results = get_field("multiresults", $diav_id);
if ($results != null) {
$val = "Completed";
} else {
$val = "In processing";
}
}
}
error_log("Currtime: " . $curr_time . " StartDate:" . $start_date . " strToTime: " . strtotime(get_field("start_date", $diav_id)) . " EndDate: " . $end_date . " Status: " . $val);
}
update_field("status_hidden", $val, $diav_id);
return true;
}
goto GQldR;
lMN2H:
function set_diavouleusi_comment_status($diav_id, $status = "closed")
{
$diav = get_post($diav_id);
set_post_comment_status($diav_id, $status);
update_articles_comment_status($diav_id, $status);
}
goto Nouv2;
v_sBd:
function diavouleusi_excerpt($excerpt)
{
if ("diavouleusi" !== get_post_type()) {
return $excerpt;
}
$post = get_post();
$extraExcerpt = "<div class="two_third tie-columns diav-content">";
$extraExcerpt .= "<span class="diav-author">" . get_diavouleusi_author($post->ID) . "</span>";
$extraExcerpt .= $excerpt;
$extraExcerpt .= get_diavouleusi_themes($post->ID);
$extraExcerpt .= get_diavouleusi_types($post->ID);
$extraExcerpt .= "</div><div class="one_third tie-columns last diav-fields">" . get_diavouleusi_intro_fields($post->ID, 1) . "</div>";
return $extraExcerpt;
}
goto X7v4v;
bD2Fo:
function get_diavouleusi_types($diav_id)
{
$val = '';
$terms = get_the_terms($diav_id, "dlb_type");
if ($terms) {
$val = "<div class="post-badges dlb_type">";
foreach ($terms as $term) {
$val .= "<div class="post-badge">" . $term->name . "</div>";
}
$val .= "</div>";
}
return $val;
}
goto nNphe;
z4Mlp:
function get_diavouleusi_themes($diav_id)
{
$val = '';
$terms = get_the_terms($diav_id, "dlb_theme");
if ($terms) {
$val = "<div class="post-badges">";
foreach ($terms as $term) {
$val .= "<div class="post-badge">" . $term->name . "</div>";
}
$val .= "</div>";
}
return $val;
}
goto bD2Fo;
US6aO:
function gnstl_show_ownpost_comments($clauses)
{
if (is_admin()) {
if (current_user_can("edit_others_posts")) {
return $clauses;
} else {
$user_id = get_current_user_id();
global $wpdb;
$clauses["join"] = ", " . $wpdb->base_prefix . "posts";
$clauses["where"] .= " AND " . $wpdb->base_prefix . "comments.comment_post_ID = " . $wpdb->base_prefix . "posts.ID" . " AND (" . $wpdb->base_prefix . "posts.post_author = " . $user_id . " OR " . $wpdb->base_prefix . "comments.user_id = " . $user_id . ")";
}
}
return $clauses;
}
goto l5bPI;
Rgqrj:
function update_all_diavouleuseis()
{
$timezone = new DateTimeZone("Europe/Athens");
error_log("Cron started at: " . wp_date("Y-m-d H:i:s", null, $timezone));
$args = array("post_type" => "diavouleusi", "orderby" => "post_date", "order" => "ASC", "post_status" => "publish");
$query = new WP_Query($args);
$diavouleuseis = $query->posts;
foreach ($diavouleuseis as $diav) {
if (!has_correct_comment_status($diav->ID)) {
$comment_status = calculate_comment_status($diav->ID);
update_articles_comment_status($diav->ID, $comment_status);
}
}
wp_reset_query();
error_log("Cron complete at: " . wp_date("Y-m-d H:i:s", null, $timezone));
}
goto kYY1r;
VRYAx:
function say_hello()
{
$txt = "Welcome to the eConsultation platform! <em>" . date_i18n("Y-m-d H:i:s", null) . "</em>";
return $txt;
}
goto TFErE;
GQldR:
function get_diavouleusi_status($diav_id)
{
return get_field("status_hidden", $diav_id);
}
goto suj3a;
Gp14y:
function display_diavouleusi_articles($atts)
{
$attributes = shortcode_atts(array("id" => ''), $atts);
print_diavouleusi_articles($attributes["id"]);
}
goto LuWBx;
zmZdY:
function calculate_diav_post_status($diav_id)
{
$currTime = current_time("Y-m-d H:i:s");
$startDate = strtotime(get_field("start_date", $diav_id));
$newPostDate = date("Y-m-d H:i:s", $startDate);
$currPostStatus = get_post_status($diav_id);
$newPostStatus = $currPostStatus;
if ($currPostStatus == "publish") {
if ($newPostDate > $currTime) {
$newPostStatus = "future";
}
} else {
if ($currPostStatus == "future") {
if ($newPostDate <= $currTime) {
$newPostStatus = "publish";
}
}
}
return $newPostStatus;
}
goto oy8KA;
ZI4HF:
function display_diavouleusi_types($atts)
{
$attributes = shortcode_atts(array("id" => ''), $atts);
return get_diavouleusi_types($attributes["id"]);
}
goto xaucG;
?>
Did this file decode correctly?
Original Code
<?php
goto VRYAx;
oy8KA:
function update_diavouleusi_status($diav_id)
{
$post = get_post($diav_id);
$val = null;
if ($post->post_status == "\x64\x72\x61\146\164") {
$val = "\104\x72\141\x66\164";
} else {
$curr_time = current_time("\x59\55\155\55\x64\x20\110\x3a\x69\72\x73");
$start_date = date("\131\x2d\x6d\x2d\144\40\x48\72\x69\x3a\x73", strtotime(get_field("\x73\x74\141\x72\x74\x5f\x64\141\164\145", $diav_id)));
$end_date = date("\131\x2d\155\55\144\x20\x48\x3a\x69\72\x73", strtotime(get_field("\145\x6e\x64\x5f\x64\141\164\145", $diav_id)));
if ($start_date > $curr_time) {
$val = "\123\x63\150\145\144\x75\154\x65\x64";
} else {
if ($end_date > $curr_time) {
$val = "\x41\143\164\151\166\145";
} else {
$results = get_field("\x6d\165\x6c\x74\x69\x72\x65\163\x75\x6c\x74\x73", $diav_id);
if ($results != null) {
$val = "\103\157\155\x70\x6c\145\164\145\144";
} else {
$val = "\111\156\x20\x70\x72\x6f\143\145\163\x73\151\156\147";
}
}
}
error_log("\x43\165\x72\x72\164\151\x6d\x65\72\40" . $curr_time . "\x20\x53\x74\x61\x72\x74\104\x61\164\x65\72" . $start_date . "\x20\163\164\162\124\157\124\151\155\x65\72\x20" . strtotime(get_field("\163\164\x61\162\x74\137\x64\141\x74\145", $diav_id)) . "\40\105\x6e\x64\104\x61\x74\x65\72\40" . $end_date . "\40\x53\164\141\x74\165\163\x3a\x20" . $val);
}
update_field("\x73\x74\x61\164\165\x73\x5f\x68\151\144\x64\x65\156", $val, $diav_id);
return true;
}
goto GQldR;
lMN2H:
function set_diavouleusi_comment_status($diav_id, $status = "\x63\x6c\157\x73\x65\x64")
{
$diav = get_post($diav_id);
set_post_comment_status($diav_id, $status);
update_articles_comment_status($diav_id, $status);
}
goto Nouv2;
v_sBd:
function diavouleusi_excerpt($excerpt)
{
if ("\x64\x69\141\x76\157\x75\154\145\165\x73\151" !== get_post_type()) {
return $excerpt;
}
$post = get_post();
$extraExcerpt = "\x3c\144\151\166\40\x63\x6c\141\163\x73\x3d\42\164\x77\x6f\x5f\164\150\x69\162\x64\x20\164\x69\x65\x2d\x63\x6f\154\165\x6d\156\163\40\x64\x69\141\166\x2d\x63\157\156\164\x65\156\164\x22\x3e";
$extraExcerpt .= "\74\x73\x70\x61\156\40\143\x6c\141\163\163\75\x22\x64\151\141\x76\x2d\x61\165\x74\150\x6f\162\x22\76" . get_diavouleusi_author($post->ID) . "\x3c\x2f\x73\x70\141\156\x3e";
$extraExcerpt .= $excerpt;
$extraExcerpt .= get_diavouleusi_themes($post->ID);
$extraExcerpt .= get_diavouleusi_types($post->ID);
$extraExcerpt .= "\74\57\144\x69\166\76\x3c\x64\x69\166\40\143\154\x61\x73\163\75\x22\157\x6e\x65\x5f\164\x68\151\x72\x64\x20\x74\151\x65\x2d\x63\x6f\x6c\165\155\156\163\x20\154\141\163\164\x20\144\x69\141\x76\55\146\151\145\154\x64\163\42\x3e" . get_diavouleusi_intro_fields($post->ID, 1) . "\x3c\x2f\x64\x69\x76\x3e";
return $extraExcerpt;
}
goto X7v4v;
bD2Fo:
function get_diavouleusi_types($diav_id)
{
$val = '';
$terms = get_the_terms($diav_id, "\144\x6c\142\137\x74\x79\160\x65");
if ($terms) {
$val = "\74\x64\x69\x76\x20\x63\x6c\x61\x73\x73\x3d\x22\x70\157\x73\x74\55\x62\x61\x64\x67\145\163\40\144\154\x62\137\x74\171\160\x65\42\x3e";
foreach ($terms as $term) {
$val .= "\x3c\x64\x69\x76\x20\143\154\141\x73\x73\75\x22\160\x6f\163\x74\x2d\142\141\144\x67\145\x22\76" . $term->name . "\74\57\144\151\166\x3e";
}
$val .= "\74\x2f\144\x69\x76\76";
}
return $val;
}
goto nNphe;
z4Mlp:
function get_diavouleusi_themes($diav_id)
{
$val = '';
$terms = get_the_terms($diav_id, "\x64\154\x62\137\x74\150\145\x6d\x65");
if ($terms) {
$val = "\x3c\144\151\x76\40\143\x6c\141\163\x73\75\x22\x70\x6f\x73\x74\55\142\141\144\147\145\163\42\76";
foreach ($terms as $term) {
$val .= "\x3c\144\151\x76\x20\143\154\x61\163\163\75\42\x70\x6f\x73\164\x2d\x62\141\144\147\x65\42\76" . $term->name . "\74\57\144\151\x76\76";
}
$val .= "\x3c\57\144\x69\x76\x3e";
}
return $val;
}
goto bD2Fo;
US6aO:
function gnstl_show_ownpost_comments($clauses)
{
if (is_admin()) {
if (current_user_can("\x65\x64\x69\x74\137\x6f\164\x68\145\162\x73\137\160\157\x73\164\163")) {
return $clauses;
} else {
$user_id = get_current_user_id();
global $wpdb;
$clauses["\152\x6f\151\156"] = "\x2c\x20" . $wpdb->base_prefix . "\160\x6f\163\164\x73";
$clauses["\167\150\145\x72\145"] .= "\40\x41\116\104\40" . $wpdb->base_prefix . "\143\x6f\155\155\145\x6e\164\163\56\x63\x6f\x6d\x6d\x65\x6e\164\x5f\x70\x6f\163\164\x5f\111\x44\40\x3d\40" . $wpdb->base_prefix . "\x70\157\x73\164\163\56\x49\x44" . "\x20\x41\x4e\x44\x20\50" . $wpdb->base_prefix . "\x70\x6f\x73\164\163\x2e\x70\x6f\x73\164\137\x61\x75\164\150\157\162\40\75\x20" . $user_id . "\40\117\122\x20" . $wpdb->base_prefix . "\x63\157\x6d\x6d\145\x6e\x74\x73\x2e\165\x73\145\162\137\x69\144\x20\x3d\40" . $user_id . "\51";
}
}
return $clauses;
}
goto l5bPI;
Rgqrj:
function update_all_diavouleuseis()
{
$timezone = new DateTimeZone("\105\165\162\157\x70\145\x2f\101\164\x68\x65\156\x73");
error_log("\x43\162\157\x6e\x20\163\x74\x61\x72\x74\145\x64\40\141\164\72\40" . wp_date("\131\x2d\155\x2d\144\40\x48\72\151\x3a\x73", null, $timezone));
$args = array("\160\157\163\x74\137\x74\171\x70\145" => "\144\x69\x61\166\157\x75\154\145\x75\163\151", "\157\162\144\145\162\142\x79" => "\160\x6f\x73\x74\x5f\144\141\x74\145", "\157\x72\x64\145\x72" => "\101\123\103", "\160\x6f\x73\x74\137\163\164\x61\x74\x75\x73" => "\160\165\142\x6c\x69\163\150");
$query = new WP_Query($args);
$diavouleuseis = $query->posts;
foreach ($diavouleuseis as $diav) {
if (!has_correct_comment_status($diav->ID)) {
$comment_status = calculate_comment_status($diav->ID);
update_articles_comment_status($diav->ID, $comment_status);
}
}
wp_reset_query();
error_log("\103\x72\157\156\40\143\x6f\x6d\160\x6c\145\x74\145\x20\141\x74\x3a\x20" . wp_date("\131\55\155\55\144\40\110\72\x69\72\163", null, $timezone));
}
goto kYY1r;
VRYAx:
function say_hello()
{
$txt = "\127\145\x6c\143\x6f\x6d\145\40\x74\x6f\x20\164\x68\145\40\x65\x43\x6f\156\x73\165\x6c\x74\x61\x74\x69\x6f\x6e\x20\x70\x6c\141\x74\x66\157\162\155\41\40\74\x65\x6d\x3e" . date_i18n("\131\x2d\x6d\x2d\144\x20\110\72\x69\72\163", null) . "\x3c\57\x65\155\x3e";
return $txt;
}
goto TFErE;
GQldR:
function get_diavouleusi_status($diav_id)
{
return get_field("\163\x74\x61\164\x75\163\137\x68\x69\144\144\145\x6e", $diav_id);
}
goto suj3a;
Gp14y:
function display_diavouleusi_articles($atts)
{
$attributes = shortcode_atts(array("\151\144" => ''), $atts);
print_diavouleusi_articles($attributes["\x69\x64"]);
}
goto LuWBx;
zmZdY:
function calculate_diav_post_status($diav_id)
{
$currTime = current_time("\131\55\155\x2d\x64\40\110\72\151\72\x73");
$startDate = strtotime(get_field("\163\164\x61\162\x74\137\x64\x61\x74\x65", $diav_id));
$newPostDate = date("\x59\x2d\x6d\x2d\144\x20\110\x3a\x69\72\x73", $startDate);
$currPostStatus = get_post_status($diav_id);
$newPostStatus = $currPostStatus;
if ($currPostStatus == "\x70\x75\142\x6c\x69\163\x68") {
if ($newPostDate > $currTime) {
$newPostStatus = "\146\x75\164\x75\x72\x65";
}
} else {
if ($currPostStatus == "\x66\165\x74\x75\x72\x65") {
if ($newPostDate <= $currTime) {
$newPostStatus = "\x70\165\x62\154\x69\x73\150";
}
}
}
return $newPostStatus;
}
goto oy8KA;
ZI4HF:
function display_diavouleusi_types($atts)
{
$attributes = shortcode_atts(array("\151\x64" => ''), $atts);
return get_diavouleusi_types($attributes["\x69\144"]);
}
goto xaucG;
Function Calls
None |
Stats
MD5 | db484a9b31c874fbe9d3568e68261462 |
Eval Count | 0 |
Decode Time | 67 ms |