Example #1
0
 public function perform()
 {
     $this->go_to_url = "";
     if ($this->stop_on_error_messages == 1 && dms_messages::does_pod_record_has_error_messages($this->podname, $this->record_id)) {
         return;
     }
     $data = array();
     // Custom PHP
     if ($this->custom_php != "") {
         dms_debug::add_database_message($this->custom_php, "Code To Execute", "DMS ACTION");
         $eval_result = eval($this->custom_php);
         dms_debug::add_database_message($eval_result, "Evaluate Result | {$this->podname} | {$this->record_id} |", "DMS ACTION");
     }
     $author = $this->current_pod->field("author");
     if (!isset($author) || $author <= 0 || $author == "") {
         global $current_user;
         $data["author"] = $current_user->ID;
     }
     dms_debug::add_database_message(var_export($data, TRUE), "Array Size", "DMS ACTION Data To Save");
     if (sizeof($data) > 0) {
         $this->current_pod->save($data);
     }
     if ($this->go_to_url != "") {
         wp_redirect($this->go_to_url);
     }
 }
Example #2
0
function jomiz_dms_pod_save($pieces, $is_new_item, $id)
{
    $podname = $pieces['params']->pod;
    if (pods_related::is_dms_pod($podname)) {
        return;
    }
    dms_debug::add_database_message("Anything {$podname} | {$id}", "Action Found", "pods-actions");
    execute_actions('auto-after-save', $podname, $pieces, $is_new_item, $id);
}
Example #3
0
 public static function show_debug_messages()
 {
     global $jomiz_dms_settings;
     if (!$jomiz_dms_settings->debug_mode) {
         return;
     }
     global $jomiz_dms_debug;
     if ($jomiz_dms_debug == null || !isset($jomiz_dms_debug)) {
         $jomiz_dms_debug = new dms_debug();
     }
     echo '<div id="debug-row" class="row english-content"><div class="col-xs-12">';
     if ($jomiz_dms_debug->is_empty()) {
         echo '<div class="alert alert-info" role="alert">No Messages In Debug Queue</div>';
     } else {
         foreach ($jomiz_dms_debug->messages as $message) {
             echo '<div><pre>' . var_export($message, TRUE) . '</pre></div>';
         }
     }
     echo '</div></div>';
 }
Example #4
0
</div><!-- Form Comes Here -->
</div>
<div class="col-xs-12 col-sm-1 col-md-2 col-lg-2 hidden-print">
	&nbsp;
</div>
</div>
<?php 
dms_debug::show_debug_messages();
?>
</div> <!--/ container -->
<?php 
wp_footer();
?>


</body>
</html>
Example #5
0
				<input type="hidden" id="podname" name="podname" value="<?php 
    echo $pods_info['name'];
    ?>
" />
				 <div class="form-group">
				    <label for="filter_by">Filter By</label>
				    <select id="filter_by" name="filter_by" class="form-control">
				    	<option value="-1">-- Please Select Field --</option>
				    	<?php 
    $filter_fields = $pods_info['options']['ui_filters'];
    foreach ($filter_fields as $filter_field) {
        $field_label = $pods_info['fields'][$filter_field]['label'];
        echo "<option value='{$filter_field}'>{$field_label}</option>";
    }
    dms_debug::add_message($pods_info['options']['ui_filters']);
    dms_debug::add_message($_GET, "Get Object", "List Page");
    ?>
				    	
				    </select>
				  </div>
				  <button type="button" class="btn btn-primary" onclick="get_new_filter_control()">Add</button>
				  <div class="form-group" id="filter-loading">
				  	<span><img src="<?php 
    echo get_template_directory_uri();
    ?>
/img/loading-small.gif" title="Loading"/></span>
				  </div>
				  <hr/>
			</div>
			<form id="form-filter" class="form-horizontal"   >