Changeset 779643
- Timestamp:
- 09/28/2013 04:53:13 PM (13 years ago)
- Location:
- rsvp-me/trunk
- Files:
-
- 4 edited
-
includes/rsvpme_functions.php (modified) (2 diffs)
-
js/rsvp_me.js (modified) (1 diff)
-
rsvpme.php (modified) (2 diffs)
-
themes/default/event.html (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
rsvp-me/trunk/includes/rsvpme_functions.php
r779404 r779643 18 18 if($wpdb->get_var("show tables like '" . $table_prefix . "respondents" . "'") != $table_prefix . "respondents" ) { 19 19 20 $sql = "CREATE TABLE " . $table s["respondents"] . "(21 id mediumint(9)NOT NULL AUTO_INCREMENT,22 event_id mediumint(9)NOT NULL,20 $sql = "CREATE TABLE " . $table_prefix . "respondents ( 21 id INT NOT NULL AUTO_INCREMENT, 22 event_id INT NOT NULL, 23 23 fname varchar(255) NOT NULL, 24 24 lname varchar(255) NOT NULL, … … 26 26 response enum('accepted', 'declined', 'maybe') NOT NULL, 27 27 msg mediumtext NULL, 28 time_accepted datetime NOT NULL, 29 UNIQUE KEY id (id) 28 time_accepted DATETIME NOT NULL, 29 UNIQUE KEY id (id), 30 PRIMARY KEY (id) 30 31 );"; 31 32 32 $wpdb->query($sql); 33 33 $affected = $wpdb->query($sql); 34 34 } 35 35 //set a temporary activeated_plugin option to be refereneced for after registration specific actions 36 add_option('Activated_Plugin', 'rsvp-me');36 //add_option('Activated_Plugin', 'rsvp-me'); 37 37 } 38 38 -
rsvp-me/trunk/js/rsvp_me.js
r779404 r779643 134 134 } 135 135 136 136 137 $.post(ajaxurl, data, function(data){ 137 138 -
rsvp-me/trunk/rsvpme.php
r779416 r779643 64 64 <script type='text/javascript'> 65 65 66 var plugin_path = "<? =RSVP_ME_PLUGIN_URI ?>";67 var ajaxurl = "<? = admin_url('admin-ajax.php'); ?>";66 var plugin_path = "<?php echo RSVP_ME_PLUGIN_URI ?>"; 67 var ajaxurl = "<?php echo str_replace(get_site_url(), "", admin_url('admin-ajax.php')); ?>"; 68 68 var rsvpCookie; //put our cookie var in the main scope 69 69 … … 118 118 $affected = $wpdb->query("INSERT INTO " . $wpdb->prefix . "rsvp_me_respondents 119 119 VALUES(NULL, '$event_id', '$fname', '$lname', '$email', '$response', '$msg', NOW())"); 120 echo json_encode(array("success" => true)); 120 121 122 if($affected > 0) echo json_encode(array("success" => true)); 123 else echo json_encode(array("error" => "There was an error adding your RSVP")); 121 124 } 122 125 } -
rsvp-me/trunk/themes/default/event.html
r779418 r779643 1 <div class="rsvp_msg"></div> 1 2 <p>{:description}</p> 2 3 <section class="rsvp-me-event-meta">
Note: See TracChangeset
for help on using the changeset viewer.