コード例 #1
0
ファイル: user.php プロジェクト: parasdahal/reactive
<?php

require_once 'core/User.php';
$url = explode('/', $_SERVER['REQUEST_URI']);
$user = new \socialplus\core\User();
$id = $user->GetIdByUsername($url[2]);
?>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf=8"/>
	<title>Social+ | Your Profile </title>
	<!--SocialPlus Files-->
	<link rel="stylesheet" href="assets/css/main.css"/>
	<script type="text/javascript" src="lib/jquery.min.js"></script>
	<!-- Bootstrap Libraries -->
	<link rel="stylesheet" href="assets/css/bootstrap.css"/>
	<script type="text/javascript" src="lib/bootstrap/js/bootstrap.min.js"></script>	
</head>
<body style="overflow-x:hidden">

	<!-- React Libraries -->
	<script type="text/javascript" src="lib/react/build/react.js"></script>
	<script type="text/javascript" src="lib/react/JSXTransformer.js"></script>
	<!--React Componentes -->

	<script type="text/jsx" src="views/components/home.jsx"></script>
	<script type="text/jsx" src="views/components/header.jsx"></script>
	<script type="text/jsx" src="views/components/feed.jsx"></script>
	<script type="text/jsx" src="views/components/status.jsx"></script>
	<script type="text/jsx" src="views/components/comment.jsx"></script>
コード例 #2
0
ファイル: getuserid.php プロジェクト: parasdahal/reactive
<?php

require_once '../core/User.php';
require_once '../core/NewUser.php';
require_once '../core/Posts.php';
$user = new \socialplus\core\User();
echo $user->GetIdByUsername($_GET['username']);
コード例 #3
0
ファイル: login.php プロジェクト: parasdahal/reactive
 * the following conditions:
 *
 * The above copyright notice and this permission notice shall be
 * included in all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
 * LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
 * OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
namespace socialplus\api;

global $user;
require_once '../core/DB.php';
require_once '../core/User.php';
require_once '../core/Posts.php';
if ($user instanceof \socialplus\core\User != true) {
    $user = new \socialplus\core\User();
}
if (isset($_POST['username']) and isset($_POST['password'])) {
    $login = array('username' => $_POST['username'], 'password' => $_POST['password'], 'remember' => 0);
    $result = $user->Login($login);
    if (is_array($result)) {
        echo json_encode($result);
    } else {
        echo 1;
    }
}
コード例 #4
0
ファイル: signup.php プロジェクト: parasdahal/reactive
 * WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 */
namespace socialplus\api;

require_once '../core/NewUser.php';
require_once '../core/User.php';
if (isset($_POST['username']) and isset($_POST['password']) and isset($_POST['email'])) {
    $newuser = new \socialplus\core\NewUser();
    $signup = array('username' => $_POST['username'], 'password' => $_POST['password'], 'email' => $_POST['email']);
    $result = $newuser->Signup($signup);
    if (is_array($result)) {
        echo json_encode($result);
    } else {
        echo $result;
    }
}
if (isset($_POST['firstname']) and isset($_POST['username']) and isset($_POST['lastname']) and isset($_POST['bio']) and isset($_POST['propic'])) {
    $newuser = new \socialplus\core\NewUser();
    $user = new \socialplus\core\User();
    $userid = $user->GetIdByUsername($_POST['username']);
    $user->user_data['id'] = $userid;
    $user->Follow(11);
    $user->Follow(1);
    $meta = array('firstname' => $_POST['firstname'], 'lastname' => $_POST['lastname'], 'bio' => $_POST['bio'], 'propic' => $_POST['propic']);
    $result = $newuser->AddMeta($userid, $meta);
    if (is_array($result)) {
        echo json_encode($result);
    } else {
        echo 1;
    }
}