Browse Source

new data content element for server variables

master
Dom SP 3 years ago
parent
commit
e6ac8ab715
3 changed files with 45 additions and 6 deletions
  1. +4
    -3
      app/controller/email.php
  2. +27
    -3
      app/modules/filesinfolders.php
  3. +14
    -0
      index.php

+ 4
- 3
app/controller/email.php View File

$smtp->set($k,$v); $smtp->set($k,$v);
} }
if ($smtp->send(\Template::instance()->render($template,'text/html'))) {
# if(false) {
$email = \Template::instance()->render($template,'text/html');
//echo $email;
if ($smtp->send($email)) {
$success = true; $success = true;
} else { } else {
$success = false; $success = false;
} }


if ($success) { if ($success) {
$f3->reroute("/email/success");
$f3->reroute("/email/success?email=".urlsafe_b64encode($email));
} else { } else {
#$f3->reroute("/email/error"); #$f3->reroute("/email/error");
echo \Template::instance()->render($template,'text/html'); echo \Template::instance()->render($template,'text/html');

+ 27
- 3
app/modules/filesinfolders.php View File

); );
break; break;
case 2: case 2:
$module = new CEimage(['image',$file,'','gallery']);
$module = new CEimage(['image',$file,'auto','gallery']);
$this->content[$domain][$key."10image"] = $module->index(); $this->content[$domain][$key."10image"] = $module->index();
unset($module); unset($module);
break; break;
$new = $el; $new = $el;
break; break;
} }

break;
case 'data':
$method = strtoupper($request[1]);
//$keys = [];
if (in_array($method,['POST','GET','SESSION'])) {
foreach ($body as $line) {
$key = explode("=",$line);
$raw = $f3->get($method.'.'.$key[0]);
if (count($key) >= 2) {
$type=$key[1];
} else {
$type = false;
}
switch ($type) {
case 'base64':
$new = urlsafe_b64decode($raw);
break;
default:
$new = $raw;
}
}
//var_dump($new);
}
break; break;
case 'image': case 'image':
if ($image) { if ($image) {


// image positioning // image positioning
if( in_array($request[2],array('left','right','full'))) {
if( in_array($request[2],array('left','right','full','auto'))) {
$class = $request[2]; $class = $request[2];
} else { } else {
$class = 'full'; $class = 'full';

+ 14
- 0
index.php View File

printf("<hr>%s:<br>Memory Usage: %s <br>", $message, memory_get_usage()); printf("<hr>%s:<br>Memory Usage: %s <br>", $message, memory_get_usage());
} }
} }
function urlsafe_b64encode($string) {
$data = base64_encode($string);
$data = str_replace(array('+','/','='),array('-','_','.'),$data);
return $data;
}

function urlsafe_b64decode($string) {
$data = str_replace(array('-','_','.'),array('+','/','='),$string);
$mod4 = strlen($data) % 4;
if ($mod4) {
$data .= substr('====', $mod4);
}
return base64_decode($data);
}


///////////////////////////// /////////////////////////////
// configure installation: // // configure installation: //

Loading…
Cancel
Save