Ejemplo n.º 1
0
     $tplContent->setVariable("groups", $groups);
     $sets = $own->getSetList();
     $tplContent->setVariable("sets", $sets);
     $html = $tplContent->get('tpl.upload.php');
     break;
 case 'settings':
     if (me() <= 0 || getS('user', 'u_email') != ownStaGramAdmin) {
         jump2();
     }
     $S = $own->getSettings();
     $tplContent->setVariable($S);
     $html = $tplContent->get('tpl.settings.php');
     break;
 case 'profile':
     if (me() <= 0) {
         jump2();
     }
     if (isset($_POST['send']) && $_POST['send'] == 1) {
         $own->setProfile($_POST);
     }
     if (isset($_POST['sendemailin']) && $_POST['sendemailin'] == 1 && isset($_POST['emailins'])) {
         $own->updateSendmailins($_POST['emailins']);
     }
     $P = $own->getProfile();
     $tplContent->setVariable($P);
     $EI = $own->getEmailin();
     $tplContent->setVariable("emailin", $EI);
     $html = $tplContent->get('tpl.profile.php');
     break;
 default:
     $public = $own->getPublics(0, 50);
Ejemplo n.º 2
0
 public function rlogin($key)
 {
     $S = $this->getSettings();
     if (isset($S['s_allowregistration']) && $S['s_allowregistration'] == 1) {
         if (stristr($key, '.') || stristr($key, '/')) {
             die("error.");
         }
         if (file_exists(projectPath . '/data/cache/' . $key . '.rlogin')) {
             $data = json_decode(file_get_contents(projectPath . '/data/cache/' . $key . '.rlogin'), true);
             $res = $this->login($data['email'], $data['id']);
             #vd($res);exit;
             if ($res['result'] == 1) {
                 jump2('overview');
             } else {
                 $reg = array('u_email' => $data['email'], 'u_password' => $data['id'], 'u_registered' => now(), 'u_confirmed' => now(), 'u_nickname' => $data['nickname'], 'u_remoteserver' => $data['server'], 'u_country' => $data['country'], 'u_city' => $data['city']);
                 $reg['u_pk'] = $this->DC->insert($reg, 'ost_user');
                 $res = $this->login($data['email'], $data['id']);
                 jump2('overview');
             }
         }
     } else {
         jump2('login');
     }
 }