Skip to content

Instantly share code, notes, and snippets.

View ChrisFrench's full-sized avatar

Chris French ChrisFrench

  • Hellosign / Dropbox
  • San Diego, CA
View GitHub Profile
@ChrisFrench
ChrisFrench / xeditableexample.php
Created December 19, 2014 18:39
xeditableexample.php
<?php $publishStates = array(array('value' => 'draft', 'text' => 'draft'), array('value' => 'unpublished', 'text' => 'unpublished'), array('value' => 'published', 'text' => 'published')) ;
<?php foreach($paginated->items as $item) { ?>
<?php $xEditable = new \Dsc\Html\xEditable($item, '/admin/pages/page/edit/inline'); ?>
<?php echo $xEditable->field('title'); ?>
<?php echo $xEditable->field('slug'); ?>
<?php echo $xEditable->field('any.deep.value'); ?>
<?php
namespace Api\Site\Controllers;
class Menu extends Auth {
public function getMenu() {
$array = $this->getInputs();
<?php
namespace Api\Site\Controllers;
class Base extends \Dsc\Controller {
public function getInputs() {
$array = (array) json_decode( file_get_contents('php://input') );
if(empty($array)) {
<?php
namespace Api\Site\Controllers;
class Auth extends Base {
public function beforeroute() {
$array = $this->input->getArray ();
if (empty ( $array ['key'] )) {
<script>
!function(g,s,q,r,d){r=g[r]=g[r]||function(){(r.q=r.q||[]).push(
arguments)};d=s.createElement(q);q=s.getElementsByTagName(q)[0];
d.src='//d1l6p2sc9645hc.cloudfront.net/tracker.js';q.parentNode.
insertBefore(d,q)}(window,document,'script','_gs');
_gs('GSN-130976-R');
</script>
public function doCSV() {
$list = (new \Dash\Site\Models\Event\Tags)->populateState()->setCondition('attendee.id', array('$exists' => false))->setCondition('ticket.id', array('$exists' => false))->setCondition('sysgentag',1)->getItems();
$fp = fopen('php://output', 'w');
header('Content-Type: application/excel');
header('Content-Disposition: attachment; filename="emptytags.csv"');
$fp = fopen('php://output', 'w');
<?php
namespace Dash\Site\Models\Event;
class Tags extends Eventbase
{
/**
* Default Document Structure
* @var unknown
*/
<?php
Class URLGenerator {
var $base = 'wdl.msft.cc/band/';
var $amount = '5600';
var $group = '1';
var $uuid = 'n40u';
var $filename = 'wdl';
var $min = 0;
<?php
namespace Mgx\Site\Controllers;
class Yammer extends Auth
{
var $provider = 'yammer';
public function index()
{
$f3 = \Base::instance();
<?php
namespace Api\Site\Models;
class Attendees extends \Users\Models\Users
{
protected $__query_params = array(
'conditions' => array(),
'fields' => array('first_name', 'last_name', 'email', 'connections'),
'sort' => array(),