Example #1
0
function dprp($v, $k = 'dprp')
{
    if (is_developer()) {
        echo '<div style="border: 1px #f00 dashed; background-color: #ccc">';
        prp($v, $k);
        echo '</div>';
    }
}
Example #2
0
 /**
  * [register description]
  * @return [type] [description]
  */
 private function _register($user_data)
 {
     $data = array('phone' => $user_data['phone_number'], 'fname' => $user_data['first_name'], 'lname' => $user_data['last_name'], 'should_send_modo_descript' => TRUE, 'is_modo_terms_agree' => TRUE);
     $response = $this->modo_model->api('people/register', $data);
     $update_data = array('modo_id' => $response->response_data->account_id);
     $this->db->where('id', $user_data['id']);
     $this->db->update('users', $update_data);
     //	set modo id
     $this->session->set_userdata('modo_id', $response->response_data->account_id);
     prp($this->db->last_query());
 }
Example #3
0
/**
*	prpx
*
*	Print POST array and exit
*	
*	@return	void
**/
function prpx()
{
    prp();
    exit;
}
        echo (int) $item_id;
        ?>
" class="thickbox si_tooltip notification_message" title="<?php 
        _e('View Data', 'sprout-invoices');
        ?>
"><?php 
        _e('View Data', 'sprout-invoices');
        ?>
</a>
				</p>
				<div id="notification_message_<?php 
        echo (int) $item_id;
        ?>
" class="cloak">
					<?php 
        prp(json_decode($data['content']));
        ?>
				</div>
			<?php 
    } elseif ($data['status_type'] == SI_Invoices::VIEWED_STATUS_UPDATE) {
        ?>
				<p>
					<?php 
        echo esc_html($data['update_title']);
        ?>
				</p>
			<?php 
    } else {
        ?>
				<?php 
        echo wpautop($data['content']);
Example #5
0
 function init($args = array())
 {
     parent::init($args);
     if (!$this->can_run()) {
         trigger_error('thor needs a db connection name (thor_db_conn_name)');
         return;
     }
     include_once CARL_UTIL_INC . 'db/db.php';
     $this->original_db_conn_name = get_current_db_connection_name();
     $this->set($this->value);
     return true;
     // if $this->value doesn't contain an xml declaration,assume it's a tmp_id
     if (strpos($this->value, '<' . '?xml') === false) {
         prp('in init, matches number');
         prp($this->value, 'this->value, in init (early)');
         $this->tmp_id = $this->value;
         // Use file('getXML.php'), instead of a direct call to
         // the database, because connecting to the test
         // database here seems to screw up the connection to
         // cms. Possibly only one mysql link can be open at
         // once.
         $this->value = implode("\n", file('http://' . HTTP_HOST_NAME . THOR_HTTP_PATH . 'getXML.php?tmp_id=' . $this->tmp_id));
         prp($this->value, 'this->value, in init (late)');
     } else {
         connectDB($this->thor_db_conn_name);
         include_once CARL_UTIL_INC . 'db/sqler.php';
         $sqler = new SQLER();
         $sqler->insert('thor', array('content' => $this->value));
         $this->tmp_id = mysql_insert_id();
         connectDB($this->original_db_conn_name);
     }
 }