Skip to content

Instantly share code, notes, and snippets.

// This JS file will hold all functions relating to people
Ti.include('includes/phpjs.js');
function Person() {
// Class variables
this.id = '';
this.name = '';
this.budget = '';
this.created = '';
this.updated = '';
// This JS file will hold all functions relating to people
Ti.include('includes/phpjs.js');
function Person() {
// Class variables
this.table = 'PEOPLE';
this.db = 'gifterapp';
this.className = 'Person';
this.columns = ['id', 'name', 'budget', 'created', 'updated'];
this.row = [];
/*
Copyright 2010 Kevin Whinnery
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
@mattlanham
mattlanham / parse.js
Created August 29, 2011 17:42 — forked from kwhinnery/parse.js
A Parse client for Titanium Mobile - sneak peek
//Public client interface
function Client(applicationId, masterKey) {
this.applicationId = applicationId;
this.masterKey = masterKey;
}
exports.Client = Client;
//Parse API endpoint
var ENDPOINT = 'https://api.parse.com/1/classes/';
var port = 12345;
var serverUrl = "http://pushapi.eval.blackberry.com";
var appId = "XXXXX";
var max = 100;
var wakeUpPage = "push.htm";
function openBISPushListener() {
try {
var ops = {port : port, appId : appId, serverUrl : serverUrl, wakeUpPage : 'push.htm', maxQueueCap : max};
javascript:$('#mw-sopaOverlay').remove();$('#content, #mw-head,#mw-panel').css('display','block');void(0);
// No point applying an account id, unless we can tell the URL (this wont work for everything)
if(array_key_exists('SERVER_NAME', $_SERVER))
{
// Get the table name
$table_name = call_user_func($this->model.'::table');
// Load config
$locked_tables = \Config::get('settings.protected_models');
// Check if it's a protected modal
<?php
namespace Orm;
class Observer_Accountid extends Observer
{
/**
* @var string property to set the timestamp on
*/
public static $property = 'account_id';
object(Fuel\Core\Request_Curl)#10 (10) {
["preserve_resource":protected]=>
NULL
["resource":protected]=>
string(40) "http://platform2/generic/index.json?id=1"
["params":protected]=>
array(0) {
}
["default_params":protected]=>
array(0) {
######### account.php in /models
<?php
class Account extends Eloquent {
public function user()
{
return $this->belongs_to('User');
}