コード例 #1
0
ファイル: dialog.php プロジェクト: Ashleyotero/oldest-old
    ?>
				</select>	
			</div>	
		</div>
		
	<?php 
    wt_static_panel_end();
    ?>
	
</form>
<?php 
}
if ($_GET["page"] == "eventbrite") {
    $event = new WT_Event($_GET["event_id"]);
    $event->retrieve();
    $data = $event->db_out(null, 0);
    $event_id = $_GET["event_id"];
    //$nonce   = wp_create_nonce(WT_Post::NONCE_INSERT);
    $title = "";
    ?>
<form>
	<div id="dialog-alert" class='wordtour-alert'></div>
	<?php 
    wt_static_panel_start(array());
    ?>
		<input type='hidden' name="eventbrite_event_id" value='<?php 
    echo $event_id;
    ?>
'></input>
		<div class="wordtour-field wordtour-field-block">
			<div class="label">Title</div>
コード例 #2
0
ファイル: template.php プロジェクト: Ashleyotero/oldest-old
function get_comment_row_html($row)
{
    global $wpdb, $_wt_options;
    $row = (array) $row;
    $comment_id = $row["comment_id"];
    $author = $row["comment_author"];
    $email = $row["comment_author_email"];
    $content = $row["comment_content"];
    $date = $row["comment_date"];
    $event_id = $row["comment_event_id"];
    $comment_total = get_comment_total_by_event($event_id);
    $total = $comment_total["total"];
    $pending = $comment_total["total_pending"];
    $status = $row["comment_approved"] ? "approved" : "unapproved";
    $user_id = $row["comment_user_id"];
    $avatar = get_avatar($user_id, 32);
    ///$event_title = get_event_title($event_id);
    $event = new WT_Event($event_id);
    $event->retrieve();
    $event_data = $event->db_out();
    $response_to = "{$event_data['event_start_date']} at the {$event_data['venue_name']}";
    $unapprove_class = "action-unapprove_comment:comment_id-{$comment_id}:event_id-{$event_id}:_nonce-" . wp_create_nonce(WT_Comment::NONCE_UNAPPROVE);
    $edit_class = "comment_id-{$comment_id}";
    $approve_class = "action-approve_comment:comment_id-{$comment_id}:event_id-{$event_id}:_nonce-" . wp_create_nonce(WT_Comment::NONCE_APPROVE);
    $delete_class = "action-delete_comment:comment_id-{$comment_id}:event_id-{$event_id}:_nonce-" . wp_create_nonce(WT_Comment::NONCE_DELETE);
    $html = "<tr class='{$status}'>\n\t\t\t\t<th class='check-column' scope='row'>\n\t\t\t\t\t<input type='checkbox' value='{$comment_id}'/>\n\t\t\t\t</th>\n\t\t\t\t<td class='author column-author'>\n\t\t\t\t\t<strong>{$avatar} {$author}</strong>\n\t\t\t\t</td>\n\t\t\t\t<td class='comment column-comment'>\n\t\t\t\t\t<div id='submitted-on'>Submitted on <a href='#'>{$date}</a></div>\n\t\t\t\t\t<p><b>{$title}</b><br/>{$content}</p>\n\t\t\t\t\t<div class='row-actions' id='comment-row-actions'>\n\t\t\t\t\t\t<span class='approve'>\n\t\t\t\t\t\t\t<a title='Approve this comment' href='#' class='{$approve_class}'>Approve</a> | \n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='unapprove'>\n\t\t\t\t\t\t\t<a title='Unapprove this comment' class='{$unapprove_class}' href='#'>Unapprove</a> | \n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t\n\t\t\t\t\t\t<span class='quickedit'> \n\t\t\t\t\t\t\t<a class='{$edit_class}' title='Edit comment' href='#'>Edit</a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t\t<span class='delete'> | \n\t\t\t\t\t\t<a class='{$delete_class}' href='#'>Delete Permanently</a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t\t<td class='response column-response'>\n\t\t\t\t\t<div class='response-links'>\n\t\t\t\t\t\t<span class='post-com-count-wrapper'>\n\t\t\t\t\t\t\t<a href='" . admin_url("admin.php?page=wordtour/navigation.php&action=edit&event_id=") . "{$event_id}'>{$response_to}<a/><br/>\n\t\t\t\t\t\t\t<a href='" . admin_url("admin.php?page=wt_comments") . "&e={$event_id}' class='post-com-count'>\n\t\t\t\t\t\t\t\t<span class='comment-count'>{$total}</span>\n\t\t\t\t\t\t\t</a>\n\t\t\t\t\t\t</span>\n\t\t\t\t\t</div>\n\t\t\t\t</td>\n\t\t\t</tr>";
    return $html;
}
コード例 #3
0
         $rsvp = new WT_RSVP($_POST["rsvp_id"]);
         $rsvp->remove();
         $rsvp->db_response("json");
         //echo json_encode(array("type"=>"success"));
     }
     break;
     // EVENTS
 // EVENTS
 case "get_event":
     $event = new WT_Event($_POST["event_id"]);
     if (!empty($_POST["event_id"])) {
         $event->retrieve();
     } else {
         $event->defaults();
     }
     echo json_encode($event->db_out(null, 0));
     break;
 case "insert_event":
     $event = new WT_Event();
     $event->insert($_POST);
     $event->db_response("json");
     break;
 case "update_event":
     $event = new WT_Event($_POST["event_id"]);
     $event->update($_POST);
     $event->db_response("json");
     break;
 case "quickupdate_event":
     $event = new WT_Event($_POST["event_id"]);
     $event->quick_update($_POST);
     $event->db_response("json");