Example #1
0
 public function __construct()
 {
     $top = new Top('', 'aboutPage');
     echo $top->getOutput();
     echo Content::c()->about->desc;
     $bottom = new Bottom('');
     echo $bottom->getOutput();
 }
 public function index()
 {
     $SliderImages = SliderImages::all();
     $top = Top::all();
     $tab = TabCategoris::all();
     return View::make('main.index')->with('slider', $SliderImages)->with('top_img', $top)->with('tab', $tab);
 }
Example #3
0
 public function actionIndex()
 {
     $newsList = array();
     $newsList = Top::getTopList();
     require_once ROOT . '/views/news/index.php';
     return true;
 }
Example #4
0
 /**
  * {@inheritdoc}
  */
 public function initBlock()
 {
     $this->sectionAppend('top', Top::forge());
     $document = \Magelight\Core\Blocks\Document::getInstance();
     $document->addMeta(['http-equiv' => "content-type", 'content' => "text/html; charset=utf-8"]);
     $document->addMeta(['name' => 'keywords', 'content' => 'welcome app, magelight']);
     $document->addCss('Magelight/Core/static/css/bootstrap.min.css');
     $document->addCss('Magelight/Core/static/css/core.css');
     $document->addJs('Magelight/Core/static/js/jquery.js');
     $document->addJs('Magelight/Core/static/js/bootstrap.min.js');
     return parent::initBlock();
 }
Example #5
0
 public function __construct()
 {
     session_start();
     // Connect to the database
     $this->db = Database::getInstance();
     // Get the website user
     $this->userId = SessionManager::getInstance()->getUserId();
     if (empty($this->userId)) {
         Debug::l('No user logged in');
         header('Location: ' . Content::getInstance()->getRootUrl());
         exit;
     }
     $userDetailsQ = $this->db->prepare('SELECT p.email, f.id as facebook_id, f.access_token as facebook_access_token, l.id as linkedin_id, l.access_token as linkedin_access_token, t.id as twitter_id, t.access_token as twitter_access_token FROM person p LEFT JOIN facebook f ON p.id = f.person_id LEFT JOIN linkedin l ON p.id = l.person_id LEFT JOIN twitter t ON p.id = t.person_id WHERE p.id = :id');
     $userDetailsQ->execute(array(':id' => $this->userId));
     $this->userDetails = $userDetailsQ->fetch(PDO::FETCH_ASSOC);
     $top = new Top('', 'settingsPage');
     echo $top->getOutput();
     echo '<h1>' . Content::c()->settings->title . '</h1>' . '<h2>' . Content::c()->settings->profiles . '</h2>' . $this->showConnectedProfiles() . '<h2>' . Content::c()->settings->email . '</h2>' . '<form id="formEmail" class="clearfix">' . '<input type="email" name="email" id="email" value="' . $this->userDetails['email'] . '" placeholder="' . Content::c()->view->email_request->placeholder . '" />' . '<input id="submitEmail" class="button" type="submit" value="' . Content::c()->settings->submit . '" />' . '</form>' . '';
     $script = '<script>' . 'var introduceme = (function (module) {' . 'module.content = module.content || {};' . 'module.content.success = "' . Content::c()->settings->success . '";' . 'module.content.saved = "' . Content::c()->settings->saved . '";' . 'return module;' . '}(introduceme || {}));' . '</script>';
     $bottom = new Bottom($script);
     echo $bottom->getOutput();
 }
 public function __construct()
 {
     session_start();
     $this->db = Database::getInstance();
     if (empty($_SESSION['mergeOtherAccount']) || empty($_SESSION['mergeNetwork'])) {
         Debug::l('Error merging account: missing session vars');
         header('Location: ' . APP_URL . '/' . Content::l() . '/');
         exit;
     }
     $this->mergeNetwork = $_SESSION['mergeNetwork'];
     $mergeOtherAccount = $_SESSION['mergeOtherAccount'];
     // Get the website user
     $userId = SessionManager::getInstance()->getUserId();
     if (!isset($userId)) {
         // No user logged in
         Debug::l('No user logged in');
         header('Location: ' . APP_URL . '/' . Content::l() . '/');
         exit;
     }
     // Load user data
     $userDetailsQ = $this->db->prepare('SELECT f.id as facebook_id, f.access_token as facebook_access_token, l.id as linkedin_id, l.access_token as linkedin_access_token, t.id as twitter_id, t.access_token as twitter_access_token FROM person p LEFT JOIN facebook f ON p.id = f.person_id LEFT JOIN linkedin l ON p.id = l.person_id LEFT JOIN twitter t ON p.id = t.person_id WHERE p.id = :id');
     $userDetailsQ->execute(array(':id' => $userId));
     $userDetails = $userDetailsQ->fetch(PDO::FETCH_ASSOC);
     $profiles = $this->loadProfiles($userDetails, true);
     // Load data for other account
     $userDetailsQ->execute(array(':id' => $mergeOtherAccount));
     $otherAccount = $userDetailsQ->fetch(PDO::FETCH_ASSOC);
     array_merge($profiles, $this->loadProfiles($otherAccount, false));
     $top = new Top('', 'mergeAccountsPage');
     echo $top->getOutput();
     echo '<h1>' . str_replace('SOCIAL_NETWORK_NAME', $this->mergeNetwork, Content::c()->merge_accounts->notice) . '</h1>' . '<p class="question">' . (count($profiles) == 2 ? Content::c()->merge_accounts->question_two_profiles : Content::c()->merge_accounts->question_more_profiles) . '</p>';
     foreach ($profiles as $profile) {
         echo $profile;
     }
     echo '<form action="/' . Content::l() . '/logout/" method="post" class="no">' . '<input type="submit" class="button" value="' . Content::c()->merge_accounts->n . '" />' . '</form>' . '<form action="/' . Content::l() . '/ajax/merge-accounts/" method="post" class="yes">' . '<input type="submit" class="button" value="' . Content::c()->merge_accounts->y . '" />' . '</form>' . '<p class="note">' . Content::c()->merge_accounts->note . '</p>';
     $bottom = new Bottom('');
     echo $bottom->getOutput();
 }
Example #7
0
 public function __construct()
 {
     session_start();
     // Connect to the database
     $this->db = Database::getInstance();
     // Get the website user
     $this->userId = SessionManager::getInstance()->getUserId();
     if (!empty($this->userId)) {
         $userDetailsQ = $this->db->prepare('SELECT f.id as facebook_id, f.access_token as facebook_access_token, l.id as linkedin_id, l.access_token as linkedin_access_token, t.id as twitter_id, t.access_token as twitter_access_token FROM person p LEFT JOIN facebook f ON p.id = f.person_id LEFT JOIN linkedin l ON p.id = l.person_id LEFT JOIN twitter t ON p.id = t.person_id WHERE p.id = :id');
         $userDetailsQ->execute(array(':id' => $this->userId));
         $this->userDetails = $userDetailsQ->fetch(PDO::FETCH_ASSOC);
     }
     $this->facebookLoginUrl = SessionManager::getInstance()->getFacebook()->getLoginUrl(array('redirect_uri' => APP_URL . '/' . Content::l() . '/login/facebookcallback/', 'scope' => 'publish_stream, offline_access'));
     $top = new Top('', 'homePage');
     echo $top->getOutput();
     echo '<div id="preloaderFriends" style="display: none;">' . Content::c()->home->loading . '</div>' . '<div id="info">' . '<p>' . Content::c()->home->desc . '</p>' . '</div>' . '<div id="formLogin" class="clearfix">' . '<p>' . Content::c()->introduce->login . '</p>' . '<a href="' . $this->facebookLoginUrl . '" id="loginFacebook" class="ir' . (!empty($this->userDetails['facebook_access_token']) ? ' loggedIn' : '') . '">Facebook</a>' . '<a href="/' . Content::l() . '/login/linkedin/" id="loginLinkedIn" class="ir' . (!empty($this->userDetails['linkedin_access_token']) ? ' loggedIn' : '') . '">LinkedIn</a>' . '<a href="/' . Content::l() . '/login/twitter/" id="loginTwitter" class="ir' . (!empty($this->userDetails['twitter_access_token']) ? ' loggedIn' : '') . '">Twitter</a>' . '<p id="loginFirst">' . Content::c()->introduce->login_here_first . '</p>' . '</div>' . '<form id="formIntroduce" class="clearfix" novalidate="novalidate" autocomplete="off">' . '<div class="friendSelector introduceeInput1">' . '<label for="introducee1">' . Content::c()->introduce->introduce . '</label>' . '<input type="text" id="introducee1" placeholder="' . Content::c()->introduce->enter_name . '" />' . '<ul class="filteredFriends"></ul>' . '</div>' . '<div class="friendSelector introduceeInput2">' . '<label for="introducee2">' . Content::c()->introduce->with . '</label>' . '<input type="text" id="introducee2" placeholder="' . Content::c()->introduce->enter_name . '" />' . '<ul class="filteredFriends"></ul>' . '</div>' . '<label for="message">' . Content::c()->introduce->why . '</label>' . '<textarea id="message" placeholder="' . Content::c()->introduce->message . '"></textarea>' . '<input id="submitIntroduce" class="button" type="submit" value="' . Content::c()->introduce->submit . '" />' . '<a href="/' . Content::l() . '/about/" class="help">' . Content::c()->introduce->help . '</a>' . '</form>';
     if (!empty($this->userId)) {
         echo $this->previousIntroductions();
     }
     $script = '<script>' . 'var introduceme = (function (module) {' . 'module.content = module.content || {};' . 'module.content.loginFirst = "' . Content::c()->introduce->login_first . '";' . 'module.personId = ' . (!empty($this->userId) ? '"' . $this->userId . '"' : 'null') . ';' . 'module.facebookId = ' . (!empty($this->userDetails['facebook_access_token']) ? '"' . $this->userDetails['facebook_id'] . '"' : 'null') . ';' . 'module.linkedInId = ' . (!empty($this->userDetails['linkedin_access_token']) ? '"' . $this->userDetails['linkedin_id'] . '"' : 'null') . ';' . 'module.twitterId = ' . (!empty($this->userDetails['twitter_access_token']) ? '"' . $this->userDetails['twitter_id'] . '"' : 'null') . ';' . 'return module;' . '}(introduceme || {}));' . '</script>';
     $bottom = new Bottom($script);
     echo $bottom->getOutput();
 }
Example #8
0
 public function availableAttributes()
 {
     $base = parent::availableAttributes();
     return array_merge($base, ['cn' => ['class' => \Mangati\Ldap\Attribute\TextAttribute::class, 'single_valued' => true], 'member' => ['class' => \Mangati\Ldap\Attribute\TextAttribute::class, 'single_valued' => false], 'description' => ['class' => \Mangati\Ldap\Attribute\TextAttribute::class, 'single_valued' => false]]);
 }
Example #9
0
/**
 * トップ画面
 *
 * @created    2015-02-05
 * @author     R. Kumabe
 * @version    v1.0
 * @copyright  Copyright (c) 2015 USEN
 */
$PAGE = "S_MENU";
include_once "../_init_auth.php";
include_once "class.Top.php";
try {
    $user = new User();
    $userdata = $user->checkAuth();
    $top = new Top();
    $param = array();
    $param['page'] = $PAGE;
    //var_dump ($_SESSION);
    $date = date('Ymd');
    $year = date('Y');
    $month = date('m');
    //$param['date'] = $date;
    $id = $_SESSION[SESSION_USER_ID];
    $name = $_SESSION[SESSION_USER];
    $authority = $_SESSION[SESSION_GROUP_CD];
    $department_cd = $_SESSION[SESSION_USER_DEPARTMENT_CD];
    $division_cd = $_SESSION[SESSION_USER_DIVISION_CD];
    $param['id'] = $id;
    $param['date'] = $date;
    $param['name'] = $name;
Example #10
0
<?php

date_default_timezone_set('Asia/Tokyo');
require_once 'app/Common/Common.php';
require_once 'app/Common/Log.php';
require_once 'app/Controller/TopController.php';
require_once 'app/Controller/MypageController.php';
//何もパラメータがなければTOP
if (!isset($_REQUEST['mode']) && !isset($_REQUEST['action'])) {
    $data = array();
    $top = new Top();
    $data = $top->topAction();
    Common::smartyView('top', 'top', $data);
} else {
    $mode = $_REQUEST['mode'];
    $class = new $mode();
    $action = $_REQUEST['action'] . 'Action';
    $data = $class->{$action}();
    Common::smartyView($mode, $_REQUEST['action'], $data);
}
 public function addtopimg()
 {
     $input_value = array('title' => Input::get('title'), 'text' => Input::get('text'), 'img_url' => Input::file('image'));
     $input_check = array('title' => array('required'), 'text' => array('required'), 'img_url' => array('required', 'mimes:png,gif,jpeg,jpg'));
     $validation = Validator::make($input_value, $input_check);
     if ($validation->fails()) {
         $error = $validation->messages()->toArray();
         return View::make('admin.top.top')->with('add', 'add')->with('error_add', $error);
     } else {
         $type = Input::file('image')->getClientOriginalExtension();
         $imgName = rand(1111111, 9999999) . time() . "." . $type;
         $path = 'uploadtop';
         $upload = Input::file('image')->move($path, $imgName);
         if ($upload) {
             $top = new Top();
             $top->img_url = $imgName;
             $top->title = Input::get('title');
             $top->text = Input::get('text');
             $top->save();
             return Redirect::to('addslidertop')->with('update_img', 'save');
         }
     }
 }
Example #12
0
 private function output($value)
 {
     $top = new Top('', 'sendIntroductionPage');
     echo $top->getOutput();
     echo '<div class="sendIntroduction">' . $value . '</div>';
     $bottom = new Bottom('');
     echo $bottom->getOutput();
 }
 public function top()
 {
     $top = new Top('', 'viewIntroductionPage');
     return $top->getOutput();
 }