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 eval("?>".base64_decode("PD9waHANCg0KbmFtZXNwYWNlIEFwcFxIdHRwXENvbnRyb2xsZXJzOw0KDQp..
Decoded Output download
?>b'<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Controller;
use App\Mixins\Installment\InstallmentPlans;
use App\Models\AdvertisingBanner;
use App\Models\Blog;
use App\CoursePrice;
use App\Models\Bundle;
use App\Models\Cart;
use App\Models\FeatureWebinar;
use App\Models\HomePageStatistic;
use App\Models\HomeSection;
use App\Models\Head;
use App\Models\Product;
use App\Models\Role;
use App\Models\Sale;
use App\Models\SpecialOffer;
use App\Models\Subscribe;
use App\Models\Ticket;
use App\Models\TrendCategory;
use App\Models\UpcomingCourse;
use App\Models\Webinar;
use App\Models\Testimonial;
use App\User;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;
use App\Models\CourseApplication;
use File;
use Validator;
use App\Models\Category;
use Auth;
use App\Models\Cookie;
use App\Models\AcademicScholarship;
use App\Models\CountryScholarship;
use App\Models\Query;
use App\Models\Fee;
use App\Models\UserLearningTime;
class ApplyFormController extends Controller
{
public function apply($id)
{
$data = CoursePrice::find($id);
$webinar=Webinar::where(\'status\', \'active\')->get();
$heads = Head::all();
return view(\'web.default.pages.apply\',compact(\'data\',\'webinar\',\'heads\'));
}
public function query()
{
$webinar=Webinar::where(\'status\', \'active\')->get();
return view(\'web.default.pages.query\',compact(\'webinar\'));
}
public function query_store(request $request){
$validatedData = $request->validate([
\'fname\' => \'required\',
\'email\' => \'required\',
\'number\' => \'required\',
\'country\' => \'required\',
\'program\' => \'required\',
]);
$query = new Query();
$query->fname = $request->fname;
$query->email = $request->email;
$query->number = $request->number;
$query->country = $request->country;
$query->program = $request->program;
$query->save();
return redirect(\'query-applied\');
}
public function scholarship_applied(request $request){
return view(\'web.default.pages.thanks\');
}
public function query_applied(){
return view(\'web.default.pages.ThanksForm\');
}
public function new_apply()
{
$webinar=Webinar::where(\'status\', \'active\')->get();
$heads = Head::all();
return view(\'web.default.pages.new_apply\',compact(\'webinar\',\'heads\'));
}
public function storeform(request $request){
$item_id = $request->program;
$user = auth()->user();
$validatedData = $request->validate([
\'dob\' => \'required|date\',
\'nationality\' => \'required|string\',
\'education\' => \'required|string\',
\'institute\' => \'required|string\',
\'graduation_year\' => \'required|numeric\',
\'program\' => \'required|string\',
\'declaration\' => \'required|boolean\',
]);
$courseApplication = new CourseApplication();
$courseApplication->course_id = auth()->user()->course_id ?? null;
$courseApplication->email = auth()->user()->email;
$courseApplication->name = auth()->user()->full_name;
$courseApplication->phone_no = auth()->user()->mobile;
$courseApplication->dob = $request->dob;
$courseApplication->nationality = $request->nationality;
$courseApplication->postal_address = $request->postal_address;
$courseApplication->education = $request->education;
$courseApplication->institute = $request->institute;
$courseApplication->graduation_year = $request->graduation_year;
$courseApplication->exprience = $request->exprience;
$courseApplication->current_employment = $request->current_employment;
$courseApplication->existing_job_title = $request->existing_job_title;
$courseApplication->program = $request->program;
$courseApplication->payment = $request->payment;
$courseApplication->declaration = $request->declaration;
$courseApplication->user_id = Auth::user()->id;
if ($request->hasfile(\'certificate\')) {
$destination = \'assets/admin/img/\' . $courseApplication->certificate;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'certificate\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'assets/admin/img/\', $filename);
$courseApplication->certificate = $filename;
}
if ($request->hasfile(\'resume\')) {
$destination = \'assets/admin/img/\' . $courseApplication->resume;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'resume\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'admin/img/\', $filename);
$courseApplication->resume = $filename;
}
$item_name=\'webinar_id\';
$data = [
\'item_name\' => $item_name,
\'item_id\' => $item_id
];
if ($item_name == \'webinar_id\') {
$result = $this->storeUserWebinarCart($user, $data);
}
if ($result != \'ok\') {
return $result;
}
$courseApplication->save();
return redirect(\'/cart\');
}
public function storeUserWebinarCart($user, $data)
{
$admissionFee =Fee::first();
session([\'admission_fee\' => $admissionFee]);
$webinar_id = $data[\'item_id\'];
$ticket_id = $data[\'ticket_id\'] ?? null;
$webinar = Webinar::where(\'id\', $webinar_id)
->where(\'private\', false)
->where(\'status\', \'active\')
->first();
if (!empty($webinar) and !empty($user)) {
$checkCourseForSale = checkCourseForSale($webinar, $user);
if ($checkCourseForSale != \'ok\') {
return $checkCourseForSale;
}
$activeSpecialOffer = $webinar->activeSpecialOffer();
Cart::updateOrCreate([
\'creator_id\' => $user->id,
\'webinar_id\' => $webinar_id,
], [
\'ticket_id\' => $ticket_id,
\'special_offer_id\' => !empty($activeSpecialOffer) ? $activeSpecialOffer->id : null,
\'created_at\' => time()
]);
return \'ok\';
}
$toastData = [
\'title\' => trans(\'public.request_failed\'),
\'msg\' => trans(\'cart.course_not_found\'),
\'status\' => \'error\'
];
return back()->with([\'toast\' => $toastData]);
}
private function showGiftModal($user)
{
$gift = Gift::query()->where(\'email\', $user->email)
->where(\'status\', \'active\')
->where(\'viewed\', false)
->where(function ($query) {
$query->whereNull(\'date\');
$query->orWhere(\'date\', \'<\', time());
})
->whereHas(\'sale\')
->first();
if (!empty($gift)) {
$gift->update([
\'viewed\' => true
]);
$data = [
\'gift\' => $gift
];
$result = (string)view()->make(\'web.default.panel.dashboard.gift_modal\', $data);
$result = str_replace(array("\r\n", "\n", " "), \'\', $result);
return $result;
}
return null;
}
private function getMonthlySalesOrPurchase($user)
{
$months = [];
$data = [];
// all 12 months
for ($month = 1; $month <= 12; $month++) {
$date = Carbon::create(date(\'Y\'), $month);
$start_date = $date->timestamp;
$end_date = $date->copy()->endOfMonth()->timestamp;
$months[] = trans(\'panel.month_\' . $month);
if (!$user->isUser()) {
$monthlySales = Sale::where(\'seller_id\', $user->id)
->whereNull(\'refund_at\')
->whereBetween(\'created_at\', [$start_date, $end_date])
->sum(\'total_amount\');
$data[] = round($monthlySales, 2);
} else {
$monthlyPurchase = Sale::where(\'buyer_id\', $user->id)
->whereNull(\'refund_at\')
->whereBetween(\'created_at\', [$start_date, $end_date])
->count();
$data[] = $monthlyPurchase;
}
}
return [
\'months\' => $months,
\'data\' => $data
];
}
public function scholarship_form_one(request $request){
return view(\'web.default.pages.scholarshipFormOne\');
}
public function scholarship_form_two(request $request){
return view(\'web.default.pages.scholarshipFormTwo\');
}
public function academic_store(request $request){
$validatedData = $request->validate([
\'name\' => \'required\',
\'email\' => \'required\',
\'phone_number\' => \'required\',
\'nationality\' => \'required\',
\'current_address\' => \'required\',
\'city\' => \'required\',
\'country\' => \'required\',
\'education\' => \'required\',
\'institute\' => \'required\',
\'transcript\' => \'required\',
\'Question\' => \'required\',
]);
$scholarship = new AcademicScholarship();
$scholarship->name = $request->name;
$scholarship->user_id = auth()->user()->id;
$scholarship->email = $request->email;
$scholarship->phone_number = $request->phone_number;
$scholarship->nationality = $request->nationality;
$scholarship->city = $request->city;
$scholarship->current_address = $request->current_address;
$scholarship->country = $request->country;
$scholarship->education = $request->education;
$scholarship->institute = $request->institute;
$scholarship->Question = $request->Question;
if ($request->hasfile(\'transcript\')) {
$destination = \'assets/admin/Scholarship/Academic/transcript\' . $scholarship->transcript;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'transcript\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'assets/admin/Scholarship/Academic/transcript\', $filename);
$scholarship->transcript = $filename;
}
if ($request->hasfile(\'certificate\')) {
$destination = \'assets/admin/Scholarship/Academic/certificate\' . $scholarship->certificate;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'certificate\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'assets/admin/Scholarship/Academic/certificate\', $filename);
$scholarship->certificate = $filename;
}
$scholarship->save();
return redirect(\'scholarship-applied\');
}
public function form_two_store(request $request){
$validatedData = $request->validate([
\'name\' => \'required\',
\'email\' => \'required\',
\'phone_number\' => \'required\',
\'nationality\' => \'required\',
\'dob\' => \'required\',
\'country\' => \'required\',
\'education\' => \'required\',
\'institute\' => \'required\',
\'passport\' => \'required\',
\'Proof_of_residency\' => \'required\',
]);
$scholarship = new CountryScholarship();
$scholarship->name = $request->name;
$scholarship->user_id = auth()->user()->id;
$scholarship->email = $request->email;
$scholarship->phone_number = $request->phone_number;
$scholarship->nationality = $request->nationality;
$scholarship->dob = $request->dob;
$scholarship->country = $request->country;
$scholarship->education = $request->education;
$scholarship->institute = $request->institute;
$scholarship->passport = $request->passport;
$scholarship->Proof_of_residency = $request->Proof_of_residency;
if ($request->hasfile(\'passport\')) {
$destination = \'assets/admin/Scholarship/Country/passport\' . $scholarship->passport;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'passport\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'assets/admin/Scholarship/Country/passport\', $filename);
$scholarship->passport = $filename;
}
if ($request->hasfile(\'Proof_of_residency\')) {
$destination = \'assets/admin/Scholarship/Country/ProofOfResidency\' . $scholarship->Proof_of_residency;
if (File::exists($destination)) {
File::delete($destination);
}
$file = $request->file(\'Proof_of_residency\');
$extension = $file->getClientOriginalExtension();
$filename = time() . \'.\' . $extension;
$file->move(\'assets/admin/Scholarship/Country/ProofOfResidency\', $filename);
$scholarship->Proof_of_residency = $filename;
}
$scholarship->save();
return redirect(\'scholarship-applied\');
}
public function saveLearningTime(Request $request)
{
$user_id = auth()->id(); // Assuming you are using Laravel\'s authentication
$course_slug = $request->input(\'course_slug\');
$time_spent_minutes = $request->input(\'time_spent_minutes\');
// Assuming you have a record for each user and course
$learningTime = UserLearningTime::where(\'user_id\', $user_id)
->where(\'course_slug\', $course_slug)
->first();
if ($learningTime) {
// Update existing record
$learningTime->time_spent_minutes += $time_spent_minutes;
$learningTime->save();
} else {
// Create a new record
UserLearningTime::create([
\'user_id\' => $user_id,
\'course_slug\' => $course_slug,
\'time_spent_min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gICAgICRmaWxlbmFtZSA9IHRpbWUoKSAuICcuJyAuICRleHRlbnNpb247DQogICAgICAgICAgICAkZmlsZS0+bW92ZSgnYXNzZXRzL2FkbWluL2ltZy8nLCAkZmlsZW5hbWUpOw0KICAgICAgICAgICAgJGNvdXJzZUFwcGxpY2F0aW9uLT5jZXJ0aWZpY2F0ZSA9ICRmaWxlbmFtZTsNCiAgICAgICAgfQ0KDQogICAgICAgIGlmICgkcmVxdWVzdC0+aGFzZmlsZSgncmVzdW1lJykpIHsNCiAgICAgICAgICAgICRkZXN0aW5hdGlvbiA9ICdhc3NldHMvYWRtaW4vaW1nLycgLiAkY291cnNlQXBwbGljYXRpb24tPnJlc3VtZTsNCiAgICAgICAgICAgIGlmIChGaWxlOjpleGlzdHMoJGRlc3RpbmF0aW9uKSkgew0KICAgICAgICAgICAgICAgIEZpbGU6OmRlbGV0ZSgkZGVzdGluYXRpb24pOw0KICAgICAgICAgICAgfQ0KICAgICAgICAgICAgJGZpbGUgPSAkcmVxdWVzdC0+ZmlsZSgncmVzdW1lJyk7DQogICAgICAgICAgICAkZXh0ZW5zaW9uID0gJGZpbGUtPmdldENsaWVudE9yaWdpbmFsRXh0ZW5zaW9uKCk7DQogICAgICAgICAgICAkZmlsZW5hbWUgPSB0aW1lKCkgLiAnLicgLiAkZXh0ZW5zaW9uOw0KICAgICAgICAgICAgJGZpbGUtPm1vdmUoJ2FkbWluL2ltZy8nLCAkZmlsZW5hbWUpOw0KICAgICAgICAgICAgJGNvdXJzZUFwcGxpY2F0aW9uLT5yZXN1bWUgPSAkZmlsZW5hbWU7DQogICAgICAgIH0NCiAgICAgICAgDQogICAgICAgICRpdGVtX25hbWU9J3dlYmluYXJfaWQnOw0KICAgICAgICAgIA0KICAgICAgICAgIA0KDQogICANCiAgICRkYXRhID0gWw0KICAgICdpdGVtX25hbWUnID0+ICRpdGVtX25hbWUsDQogICAgJ2l0ZW1faWQnID0+ICRpdGVtX2lkDQpdOw0KICAgICAgICAgIGlmICgkaXRlbV9uYW1lID09ICd3ZWJpbmFyX2lkJykgew0KICAgICAgICAgICAgICAgICRyZXN1bHQgPSAkdGhpcy0+c3RvcmVVc2VyV2ViaW5hckNhcnQoJHVzZXIsICRkYXRhKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgICAgIA0KICAgICAgICAgICAgIGlmICgkcmVzdWx0ICE9ICdvaycpIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gJHJlc3VsdDsNCiAgICAgICAgICAgIH0NCg0KICAgICAgICAkY291cnNlQXBwbGljYXRpb24tPnNhdmUoKTsNCg0KICAgICAgIA0KICAgICAgICANCiAgICAgICAgcmV0dXJuIHJlZGlyZWN0KCcvY2FydCcpOw0KICAgICAgICANCiAgICB9DQogICAgDQogICAgDQogICAgcHVibGljIGZ1bmN0aW9uIHN0b3JlVXNlcldlYmluYXJDYXJ0KCR1c2VyLCAkZGF0YSkNCiAgICB7DQogICAgICAgICRhZG1pc3Npb25GZWUgPUZlZTo6Zmlyc3QoKTsNCiAgICAgICAgc2Vzc2lvbihbJ2FkbWlzc2lvbl9mZWUnID0+ICRhZG1pc3Npb25GZWVdKTsNCiAgICAgICAgJHdlYmluYXJfaWQgPSAkZGF0YVsnaXRlbV9pZCddOw0KICAgICAgICAkdGlja2V0X2lkID0gJGRhdGFbJ3RpY2tldF9pZCddID8/IG51bGw7DQoNCiAgICAgICAgJHdlYmluYXIgPSBXZWJpbmFyOjp3aGVyZSgnaWQnLCAkd2ViaW5hcl9pZCkNCiAgICAgICAgICAgIC0+d2hlcmUoJ3ByaXZhdGUnLCBmYWxzZSkNCiAgICAgICAgICAgIC0+d2hlcmUoJ3N0YXR1cycsICdhY3RpdmUnKQ0KICAgICAgICAgICAgLT5maXJzdCgpOw0KDQogICAgICAgIGlmICghZW1wdHkoJHdlYmluYXIpIGFuZCAhZW1wdHkoJHVzZXIpKSB7DQogICAgICAgICAgICAkY2hlY2tDb3Vyc2VGb3JTYWxlID0gY2hlY2tDb3Vyc2VGb3JTYWxlKCR3ZWJpbmFyLCAkdXNlcik7DQoNCiAgICAgICAgICAgIGlmICgkY2hlY2tDb3Vyc2VGb3JTYWxlICE9ICdvaycpIHsNCiAgICAgICAgICAgICAgICByZXR1cm4gJGNoZWNrQ291cnNlRm9yU2FsZTsNCiAgICAgICAgICAgIH0NCg0KICAgICAgICAgICAgJGFjdGl2ZVNwZWNpYWxPZmZlciA9ICR3ZWJpbmFyLT5hY3RpdmVTcGVjaWFsT2ZmZXIoKTsNCg0KICAgICAgICAgICAgQ2FydDo6dXBkYXRlT3JDcmVhdGUoWw0KICAgICAgICAgICAgICAgICdjcmVhdG9yX2lkJyA9PiAkdXNlci0+aWQsDQogICAgICAgICAgICAgICAgJ3dlYmluYXJfaWQnID0+ICR3ZWJpbmFyX2lkLA0KICAgICAgICAgICAgXSwgWw0KICAgICAgICAgICAgICAgICd0aWNrZXRfaWQnID0+ICR0aWNrZXRfaWQsDQogICAgICAgICAgICAgICAgJ3NwZWNpYWxfb2ZmZXJfaWQnID0+ICFlbXB0eSgkYWN0aXZlU3BlY2lhbE9mZmVyKSA/ICRhY3RpdmVTcGVjaWFsT2ZmZXItPmlkIDogbnVsbCwNCiAgICAgICAgICAgICAgICAnY3JlYXRlZF9hdCcgPT4gdGltZSgpDQogICAgICAgICAgICBdKTsNCg0KICAgICAgICAgICAgcmV0dXJuICdvayc7DQogICAgICAgIH0NCg0KICAgICAgICAkdG9hc3REYXRhID0gWw0KICAgICAgICAgICAgJ3RpdGxlJyA9PiB0cmFucygncHVibGljLnJlcXVlc3RfZmFpbGVkJyksDQogICAgICAgICAgICAnbXNnJyA9PiB0cmFucygnY2FydC5jb3Vyc2Vfbm90X2ZvdW5kJyksDQogICAgICAgICAgICAnc3RhdHVzJyA9PiAnZXJyb3InDQogICAgICAgIF07DQogICAgICAgIHJldHVybiBiYWNrKCktPndpdGgoWyd0b2FzdCcgPT4gJHRvYXN0RGF0YV0pOw0KICAgIH0NCiAgICANCg0KICAgIA0KICANCg0KICAgIHByaXZhdGUgZnVuY3Rpb24gc2hvd0dpZnRNb2RhbCgkdXNlcikNCiAgICB7DQogICAgICAgICRnaWZ0ID0gR2lmdDo6cXVlcnkoKS0+d2hlcmUoJ2VtYWlsJywgJHVzZXItPmVtYWlsKQ0KICAgICAgICAgICAgLT53aGVyZSgnc3RhdHVzJywgJ2FjdGl2ZScpDQogICAgICAgICAgICAtPndoZXJlKCd2aWV3ZWQnLCBmYWxzZSkNCiAgICAgICAgICAgIC0+d2hlcmUoZnVuY3Rpb24gKCRxdWVyeSkgew0KICAgICAgICAgICAgICAgICRxdWVyeS0+d2hlcmVOdWxsKCdkYXRlJyk7DQogICAgICAgICAgICAgICAgJHF1ZXJ5LT5vcldoZXJlKCdkYXRlJywgJzwnLCB0aW1lKCkpOw0KICAgICAgICAgICAgfSkNCiAgICAgICAgICAgIC0+d2hlcmVIYXMoJ3NhbGUnKQ0KICAgICAgICAgICAgLT5maXJzdCgpOw0KDQogICAgICAgIGlmICghZW1wdHkoJGdpZnQpKSB7DQogICAgICAgICAgICAkZ2lmdC0+dXBkYXRlKFsNCiAgICAgICAgICAgICAgICAndmlld2VkJyA9PiB0cnVlDQogICAgICAgICAgICBdKTsNCg0KICAgICAgICAgICAgJGRhdGEgPSBbDQogICAgICAgICAgICAgICAgJ2dpZnQnID0+ICRnaWZ0DQogICAgICAgICAgICBdOw0KDQogICAgICAgICAgICAkcmVzdWx0ID0gKHN0cmluZyl2aWV3KCktPm1ha2UoJ3dlYi5kZWZhdWx0LnBhbmVsLmRhc2hib2FyZC5naWZ0X21vZGFsJywgJGRhdGEpOw0KICAgICAgICAgICAgJHJlc3VsdCA9IHN0cl9yZXBsYWNlKGFycmF5KCJcclxuIiwgIlxuIiwgIiAgIiksICcnLCAkcmVzdWx0KTsNCg0KICAgICAgICAgICAgcmV0dXJuICRyZXN1bHQ7DQogICAgICAgIH0NCg0KICAgICAgICByZXR1cm4gbnVsbDsNCiAgICB9DQoNCiAgICBwcml2YXRlIGZ1bmN0aW9uIGdldE1vbnRobHlTYWxlc09yUHVyY2hhc2UoJHVzZXIpDQogICAgew0KICAgICAgICAkbW9udGhzID0gW107DQogICAgICAgICRkYXRhID0gW107DQoNCiAgICAgICAgLy8gYWxsIDEyIG1vbnRocw0KICAgICAgICBmb3IgKCRtb250aCA9IDE7ICRtb250aCA8PSAxMjsgJG1vbnRoKyspIHsNCiAgICAgICAgICAgICRkYXRlID0gQ2FyYm9uOjpjcmVhdGUoZGF0ZSgnWScpLCAkbW9udGgpOw0KDQogICAgICAgICAgICAkc3RhcnRfZGF0ZSA9ICRkYXRlLT50aW1lc3RhbXA7DQogICAgICAgICAgICAkZW5kX2RhdGUgPSAkZGF0ZS0+Y29weSgpLT5lbmRPZk1vbnRoKCktPnRpbWVzdGFtcDsNCg0KICAgICAgICAgICAgJG1vbnRoc1tdID0gdHJhbnMoJ3BhbmVsLm1vbnRoXycgLiAkbW9udGgpOw0KDQogICAgICAgICAgICBpZiAoISR1c2VyLT5pc1VzZXIoKSkgew0KICAgICAgICAgICAgICAgICRtb250aGx5U2FsZXMgPSBTYWxlOjp3aGVyZSgnc2VsbGVyX2lkJywgJHVzZXItPmlkKQ0KICAgICAgICAgICAgICAgICAgICAtPndoZXJlTnVsbCgncmVmdW5kX2F0JykNCiAgICAgICAgICAgICAgICAgICAgLT53aGVyZUJldHdlZW4oJ2NyZWF0ZWRfYXQnLCBbJHN0YXJ0X2RhdGUsICRlbmRfZGF0ZV0pDQogICAgICAgICAgICAgICAgICAgIC0+c3VtKCd0b3RhbF9hbW91bnQnKTsNCg0KICAgICAgICAgICAgICAgICRkYXRhW10gPSByb3VuZCgkbW9udGhseVNhbGVzLCAyKTsNCiAgICAgICAgICAgIH0gZWxzZSB7DQogICAgICAgICAgICAgICAgJG1vbnRobHlQdXJjaGFzZSA9IFNhbGU6OndoZXJlKCdidXllcl9pZCcsICR1c2VyLT5pZCkNCiAgICAgICAgICAgICAgICAgICAgLT53aGVyZU51bGwoJ3JlZnVuZF9hdCcpDQogICAgICAgICAgICAgICAgICAgIC0+d2hlcmVCZXR3ZWVuKCdjcmVhdGVkX2F0JywgWyRzdGFydF9kYXRlLCAkZW5kX2RhdGVdKQ0KICAgICAgICAgICAgICAgICAgICAtPmNvdW50KCk7DQoNCiAgICAgICAgICAgICAgICAkZGF0YVtdID0gJG1vbnRobHlQdXJjaGFzZTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KDQogICAgICAgIHJldHVybiBbDQogICAgICAgICAgICAnbW9udGhzJyA9PiAkbW9udGhzLA0KICAgICAgICAgICAgJ2RhdGEnID0+ICRkYXRhDQogICAgICAgIF07DQogICAgfQ0KICAgIA0KICAgICBwdWJsaWMgZnVuY3Rpb24gc2Nob2xhcnNoaXBfZm9ybV9vbmUocmVxdWVzdCAkcmVxdWVzdCl7DQogICAgICAgICAgcmV0dXJuIHZpZXcoJ3dlYi5kZWZhdWx0LnBhZ2VzLnNjaG9sYXJzaGlwRm9ybU9uZScpOw0KICAgICAgfQ0KICAgICAgDQogICAgICBwdWJsaWMgZnVuY3Rpb24gc2Nob2xhcnNoaXBfZm9ybV90d28ocmVxdWVzdCAkcmVxdWVzdCl7DQogICAgICAgICAgcmV0dXJuIHZpZXcoJ3dlYi5kZWZhdWx0LnBhZ2VzLnNjaG9sYXJzaGlwRm9ybVR3bycpOw0KICAgICAgfQ0KICAgICAgDQogICAgICANCiAgICAgICAgcHVibGljIGZ1bmN0aW9uIGFjYWRlbWljX3N0b3JlKHJlcXVlc3QgJHJlcXVlc3Qpew0KICAgICAgICAgIA0KICAgICAgICAgICAkdmFsaWRhdGVkRGF0YSA9ICRyZXF1ZXN0LT52YWxpZGF0ZShbDQogICAgICAgICAgICAnbmFtZScgPT4gJ3JlcXVpcmVkJywNCiAgICAgICAgICAgICdlbWFpbCcgPT4gJ3JlcXVpcmVkJywNCiAgICAgICAgICAgICdwaG9uZV9udW1iZXInID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnbmF0aW9uYWxpdHknID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnY3VycmVudF9hZGRyZXNzJyA9PiAncmVxdWlyZWQnLA0KICAgICAgICAgICAgJ2NpdHknID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnY291bnRyeScgPT4gJ3JlcXVpcmVkJywNCiAgICAgICAgICAgICdlZHVjYXRpb24nID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnaW5zdGl0dXRlJyA9PiAncmVxdWlyZWQnLA0KICAgICAgICAgICAgJ3RyYW5zY3JpcHQnID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnUXVlc3Rpb24nID0+ICdyZXF1aXJlZCcsDQogICAgICAgIF0pOw0KICAgICAgICANCiAgICAgICAgDQoNCiAgICAgICAgDQogICAgICAgIA0KICAgICAgICANCiAgICAgICAgICRzY2hvbGFyc2hpcCA9IG5ldyBBY2FkZW1pY1NjaG9sYXJzaGlwKCk7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPm5hbWUgPSAgJHJlcXVlc3QtPm5hbWU7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPnVzZXJfaWQgPSAgYXV0aCgpLT51c2VyKCktPmlkOw0KICAgICAgICAgJHNjaG9sYXJzaGlwLT5lbWFpbCA9ICAkcmVxdWVzdC0+ZW1haWw7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPnBob25lX251bWJlciA9ICRyZXF1ZXN0LT5waG9uZV9udW1iZXI7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPm5hdGlvbmFsaXR5ID0gJHJlcXVlc3QtPm5hdGlvbmFsaXR5Ow0KICAgICAgICAgJHNjaG9sYXJzaGlwLT5jaXR5ID0gJHJlcXVlc3QtPmNpdHk7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPmN1cnJlbnRfYWRkcmVzcyA9ICRyZXF1ZXN0LT5jdXJyZW50X2FkZHJlc3M7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPmNvdW50cnkgPSAkcmVxdW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nID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnZW1haWwnID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAncGhvbmVfbnVtYmVyJyA9PiAncmVxdWlyZWQnLA0KICAgICAgICAgICAgJ25hdGlvbmFsaXR5JyA9PiAncmVxdWlyZWQnLA0KICAgICAgICAgICAgJ2RvYicgPT4gJ3JlcXVpcmVkJywNCiAgICAgICAgICAgICdjb3VudHJ5JyA9PiAncmVxdWlyZWQnLA0KICAgICAgICAgICAgJ2VkdWNhdGlvbicgPT4gJ3JlcXVpcmVkJywNCiAgICAgICAgICAgICdpbnN0aXR1dGUnID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAncGFzc3BvcnQnID0+ICdyZXF1aXJlZCcsDQogICAgICAgICAgICAnUHJvb2Zfb2ZfcmVzaWRlbmN5JyA9PiAncmVxdWlyZWQnLA0KICAgICAgICBdKTsNCiAgICAgICAgDQogICAgICAgIA0KDQogICAgICAgIA0KICAgICAgICANCiAgICAgICAgDQogICAgICAgICAkc2Nob2xhcnNoaXAgPSBuZXcgQ291bnRyeVNjaG9sYXJzaGlwKCk7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPm5hbWUgPSAgJHJlcXVlc3QtPm5hbWU7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPnVzZXJfaWQgPSAgYXV0aCgpLT51c2VyKCktPmlkOw0KICAgICAgICAgJHNjaG9sYXJzaGlwLT5lbWFpbCA9ICAkcmVxdWVzdC0+ZW1haWw7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPnBob25lX251bWJlciA9ICRyZXF1ZXN0LT5waG9uZV9udW1iZXI7DQogICAgICAgICAkc2Nob2xhcnNoaXAtPm5hdGlvbmFsaXR5ID0gJHJlcXVlc3QtPm5hdGlvbmFsaXR5Ow0KICAgICAgICAgJHNjaG9sYXJzaGlwLT5kb2IgPSAkcmVxdWVzdC0+ZG9iOw0KICAgICAgICAgJHNjaG9sYXJzaGlwLT5jb3VudH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Sk7DQogICAgfQ0KDQogICAgcmV0dXJuIHJlc3BvbnNlKCktPmpzb24oWydzdWNjZXNzJyA9PiB0cnVlXSk7DQp9IA0KICAgICAgDQogICAgDQp9")); ?>
Function Calls
base64_decode | 1 |
Stats
MD5 | 90f576437372f5869a0341eb1fe13d14 |
Eval Count | 1 |
Decode Time | 69 ms |