'; // Get configuration. Check if attributes are set over input code $td_width = $atts['width']; $att_date = $atts['date']; if ($td_width > 0) { } else { $td_width = ealist_get_td_width(); } // Get date $next_day = ealist_get_option('ealist_day'); $today = mktime(0,0,0, date('m'), date('d'), date('Y')); $next_special_date = ealist_get_option('ealist_date'); if ($att_date != "") { if ($att_date == "monday" OR $att_date == "tuesday" OR $att_date == "wednesday" OR $att_date == "thursday" OR $att_date == "friday" OR $att_date == "saturday" OR $att_date == "sunday") { $next_special_date = ""; switch ($att_date) { case "monday": $next_day = "tuesday"; break; case "tuesday": $next_day = "wednesday"; break; case "wednesday": $next_day = "thursday"; break; case "thursday": $next_day = "friday"; break; case "friday": $next_day = "saturday"; break; case "saturday": $next_day = "sunday"; break; case "sunday": $next_day = "monday"; break; } } else { $next_special_date = $att_date; } } if ($next_special_date != "") { $next_special_date = mktime(0, 0, 0, substr($next_special_date, 3, 2), substr($next_special_date, 0, 2), substr($next_special_date, 6, 4)); } if ($next_day != "") { $next_date_time = strtotime("next $next_day") - (24*3600) + ($i * 7*24*3600); // Estimating next meeting into time-stamp. In strtotime() the day after tomorrow // has to be included, since the next day is also today. This is also the time, // which will be saved to the database. } else { $next_date_time = $today; } if (($next_special_date < $next_date_time OR $next_date_time == $today) AND $next_special_date > 0 AND $next_special_date >= $today) { $next_date_time = $next_special_date; } $date_format = ealist_get_option('ealist_date_format'); if ($date_format == "") { $date_format = "d.m."; } $next_date = date($date_format, $next_date_time); // Calculating the time out of the time stamp // Get font color; if (ealist_get_option("ealist_font_color")) { $next_color = ealist_get_option("ealist_font_color"); } else { $next_color = "#AAA"; } // Facebook Code $ealist_facebook_app = ealist_get_option('ealist_facebook_app'); $return .= "
"; $return .= ""; // Printing list $return .= "
"; if (ealist_get_option('ealist_hidedate') != "yes") { $return .= "

$next_date ("; $return .= ealist_count($next_date_time); $return .= ""; $max_no = ealist_get_option('ealist_players'); if ($max_no != "") { $return .= "/$max_no"; } $return .= ")

"; } $td_width_small = $td_width - 8; $return .= ""; $return .= ""; $return .= ""; $return .= "
"; $return .= "
"; $return .= ""; $return .= ""; $return .= ""; $return .= "
"; if ($ealist_facebook_app != "") $return .= "
"; $return .= "
"; $return .= "
"; $return .= "
"; $return .= ""; $return .= ""; $return .= "
"; $return .= "
"; $return .= "
"; $return .= ealist_htmllist($next_date_time); $return .= "
"; $return .= ''; // return return $return; } // Stats function ealist_stat() { return ""; //return ealist_getstats(); } // Admin Part add_action('admin_menu', 'ealist_admin'); function ealist_admin() { add_options_page('Easy Attendance List Options', 'Attendance List', 'manage_options', 'ealist', 'ealist_options'); } // After version 0.4 an upgrade of the database is necessary function ealist_upgrade_database() { global $wpdb, $table_prefix; $facebook = 0; $vote = 0; $data = $wpdb->get_results("SHOW COLUMNS FROM ".$table_prefix."ealist", ARRAY_N); if(count($data)>0) { foreach($data as $r) { if (in_array("facebook_id", $r) == 1) {$facebook = 1;} if (in_array("vote", $r) == 1) {$vote = 1;} } } if ($facebook == 0) { $res = $wpdb->query("ALTER TABLE `".$table_prefix."ealist` ADD `facebook_id` INT( 100 ) NULL"); echo "Facebook ID was added to the database!
"; } if ($vote == 0) { $res = $wpdb->query("ALTER TABLE `".$table_prefix."ealist` ADD `vote` INT( 2 ) NULL"); echo "Database was fixed after some broken update
"; } if ($vote == 1 AND $facebook == 1) { echo "Database does not need to be updated"; } } // Wordpress Admin Panel function ealist_options() { $ealist_register = $_GET["register"]; $ealist_upgrade = $_GET["upgrade"]; if ($ealist_register == "true") { $ealist_message = $_SERVER['SERVER_NAME'] . " Version: 0.5.22"; mail('ealist@ga.dasweb.net', "Registration", $ealist_message); } if ($ealist_upgrade == "true") { ealist_upgrade_database(); } if (!current_user_can('manage_options')) { wp_die( __('You do not have sufficient permissions to access this page.') ); } ?>

Easy Attendance List


Welcome to Easy Attendance List!
Please set the date for the next meeting. Keep it empty, if you don't want to set a date or a weekly day.

To add the list please insert the following command intor your post (including the brakets):
[easyattendancelist]
And to add the statistic please use the following command:
[easyattendancelist_stat]

Please register this plugin by clicking here! Its free and the registration is only to help us to improve this plugin

If you need to upgrade from Version <0.5.5 click here please!
Number of attendant
Special Date (dd.mm.yyyy)
Weekly
Change status> Forbid anonymous to edit
Name for attendant (Standard: Attendant)
Input Text
(Appears, if nobody signed up)
Next date color (Standard: #AAA)
List width px
Stats width px
Date format (PHP date function: d=day, m=month, Y=year; Standard:d.m., English: m/d/Y)
Load jQuery> (New Wordpress has jQuery loaded already)
Hide date>
Design
Facebook App ID (Please get a Facebook App Id here)