示例#1
0
 function __construct()
 {
     parent::__construct();
 }
示例#2
0
<?php

/**
 * @author Shivaraj <*****@*****.**>_Oct_12_2014
 * @tutorial Delete category
 */
?>
<!DOCTYPE html>
<html>
    <head>
	<title></title>
    </head>
    <body>
	<h2></h2>
	<div align="right"><a href="/platform/dashboard/money-category">View Categories</a></div>

<?php 
include "../blocks/paths.php";
include $myclass_url;
$ob = new Myactions();
$linkid = $ob->db_conn();
$category_id = $_GET['id'];
$rslt = mysql_query("DELETE FROM m_categories WHERE category_id='" . $category_id . "'", $linkid);
if (mysql_affected_rows() > 0) {
    echo 'Category deleted successfully';
} else {
    echo 'No category found.';
}
?>
    </body>
</html>
示例#3
0
<?php

/**
 * @author Shivaraj <*****@*****.**> Dec_18_2014
 * @tutorial Web google login
 */
error_reporting(E_ALL);
include_once 'includes/myclasses.php';
$ob = new Myactions();
$site_url = $_SERVER['HTTP_HOST'] == 'localhost:13080' ? 'http://localhost:13080' : 'http://lyfekit.com';
$client_id = $_SERVER['HTTP_HOST'] == 'localhost:13080' ? "577040276233-jve4tho9nlqkhtr0gkjt9usmnksssar2.apps.googleusercontent.com" : "577040276233-uaf3iiujllb7dq49g96a80jsn1690dhg.apps.googleusercontent.com";
$client_secret = $_SERVER['HTTP_HOST'] == 'localhost:13080' ? "DFiFCKwiG5owtXIqMK04CW4N" : "ajEb8i843yMnsWiXBNCyExpT";
$redirect_uri = $_SERVER['HTTP_HOST'] == 'localhost:13080' ? 'http://localhost:13080' : 'http://lyfekit.com';
require_once realpath(dirname(__FILE__) . '/autoload.php');
$client = new Google_Client();
$client->setApplicationName("LyfeKit");
// optional
$client->setClientId($client_id);
$client->setClientSecret($client_secret);
$client->setRedirectUri($redirect_uri);
$client->setApprovalPrompt('auto');
$client->setIncludeGrantedScopes(TRUE);
$client->setAccessType('offline');
$client->setScopes(array("https://www.googleapis.com/auth/plus.login", "https://www.googleapis.com/auth/userinfo.profile", "https://www.googleapis.com/auth/userinfo.email"));
if (isset($_SESSION['access_token']) && !empty($_SESSION['access_token'])) {
    $client->setAccessToken($_SESSION['access_token']);
    //print_r(array("action"=>"write","module"=>"google-login","content_style"=>"single_content","code"=>"","access_token"=>$_SESSION['access_token'],"request_from"=>"web"));
    $results = $ob->getApiContent($site_url . "/api/", 'array', array("action" => "write", "module" => "google-login", "content_style" => "single_content", "code" => "", "access_token" => $_SESSION['access_token'], "request_from" => "web"));
    //,"refresh_token"=>"1/rJd6RBEfmHV_Y_O5EUyuvqL73LFnSzNpiwOIBWsb8RYMEudVrK5jSpoR30zcRFq6"
    if ($results['status_code'] == 200) {
        $resp_data = json_decode($results['response'], TRUE);
示例#4
0
<?php

//header('Content-Type: application/json');
/**
 * @author Shivaraj <*****@*****.**>_Sep_15_2014
 * @tutorial Root for api urls
 */
$get = $_REQUEST;
require_once 'google/appengine/api/taskqueue/PushTask.php';
use google\appengine\api\taskqueue\PushTask;
$output = '';
include "blocks/paths.php";
include $myclass_url;
include "includes/easyPagination.php";
$ob = new Myactions();
if (!isset($get['module'])) {
    $output = $ob->unknown();
}
if (!isset($get['action'])) {
    $output = $ob->unknown();
}
switch ($get['action']) {
    case 'read':
        include 'search.php';
        break;
    case 'write':
        include 'write.php';
        break;
    case 'delete':
        include 'delete.php';
        break;