コード例 #1
0
ファイル: template.php プロジェクト: Ashleyotero/oldest-old
function gallery_rows($rows)
{
    global $wpdb;
    if (!$rows) {
        ?>
		<tr class="empty">
			<td colspan="3"><p>No Galleries Found</p></td>
		</tr> 
	<?php 
    } else {
        ?>
	<?php 
        $gallery = new WT_Gallery();
        foreach ($rows as $row) {
            $gallery->data = $row;
            echo get_gallery_row_html($gallery->db_out($gallery->data));
        }
    }
}
コード例 #2
0
ファイル: event.js.php プロジェクト: Ashleyotero/oldest-old
		return false;
	});

	$("#add-tour").click(function(){
		openInsertTourDialog({},function(r){
			$("#event_tour_name").val(r.result.tour_name).focus();
		});
		return false;
	});
	
	
	<?php 
$galleries_array = array();
foreach (wt_galleries() as $gallery) {
    $go = new WT_Gallery();
    $go->db_out($gallery);
    array_push($galleries_array, array("id" => $gallery["gallery_id"], "name" => $gallery["gallery_name"]));
}
?>

	function loadEvent(id){
		var id = id || "";
		$(this).wordtourform("ajax",{action:"get_event",event_id:id},function(r){
			if($.isArray(r)) {
				openAlertDialog("Error Loading Event","Event doesn't exist in the system",function(){
					window.location = $CONSTANT.PAGE_EVENTS;
					$("#wordtour-button-save").toolbarbutton("disable");
					$("#wordtour-button-trash").toolbarbutton("disable");
					$("#wordtour-button-publish").toolbarbutton("disable");
					$("#wordtour-button-twitter").toolbarbutton("disable");
					$("#wordtour-button-facebook").toolbarbutton("disable");
コード例 #3
0
ファイル: handlers.php プロジェクト: Ashleyotero/oldest-old
function wordtour_gallery_checklist()
{
    foreach (wt_galleries() as $gallery) {
        $go = new WT_Gallery();
        $go->db_out($gallery);
        echo "<li><input type='text' value='{$gallery['gallery_id']}'>{$gallery['gallery_name']}</li>";
    }
}
コード例 #4
0
     if ($_POST["id"]) {
         $tour = new WT_Tour();
         $tour->delete_all(json_decode(stripslashes($_POST["id"])), $_POST["_nonce"]);
         $tour->db_response("json");
     }
     break;
     // GALLERY
 // GALLERY
 case "get_gallery":
     $gallery = new WT_Gallery($_POST["gallery_id"]);
     if (!empty($_POST["gallery_id"])) {
         $gallery->retrieve();
     } else {
         $gallery->defaults();
     }
     echo json_encode($gallery->db_out(null, 0));
     break;
 case "insert_gallery":
     $gallery = new WT_Gallery();
     $gallery->insert($_POST);
     $gallery->db_response("json");
     break;
 case "update_gallery":
     $gallery = new WT_Gallery($_POST["gallery_id"]);
     $gallery->update($_POST);
     $gallery->db_response("json");
     break;
 case "update_gallery-from-event":
     $gallery = new WT_Gallery($_POST["gallery_id"]);
     $gallery->update($_POST);
     return $gallery->data["gallery_name"];