├── PasswordHash.php ├── README.md ├── addevent.php ├── addeventaction.php ├── adminmain.php ├── config.php ├── css └── jquery-ui-timepicker-addon.css ├── editevent.php ├── editeventaction.php ├── enforcelogon.php ├── event.php ├── foot.php ├── head.php ├── image └── masthead.png ├── index.php ├── ipn.php ├── jquery ├── additional-methods.js ├── additional-methods.min.js ├── jquery-ui-sliderAccess.js ├── jquery-ui-timepicker-addon.js ├── jquery.validate.js └── jquery.validate.min.js ├── loggedin.php ├── login.php ├── main.php ├── phpqrcode ├── CHANGELOG ├── INSTALL ├── LICENSE ├── README ├── VERSION ├── bindings │ └── tcpdf │ │ └── qrcode.php ├── cache │ ├── frame_1.dat │ ├── frame_1.png │ ├── frame_10.dat │ ├── frame_10.png │ ├── frame_11.dat │ ├── frame_11.png │ ├── frame_12.dat │ ├── frame_12.png │ ├── frame_13.dat │ ├── frame_13.png │ ├── frame_14.dat │ ├── frame_14.png │ ├── frame_15.dat │ ├── frame_15.png │ ├── frame_16.dat │ ├── frame_16.png │ ├── frame_17.dat │ ├── frame_17.png │ ├── frame_18.dat │ ├── frame_18.png │ ├── frame_19.dat │ ├── frame_19.png │ ├── frame_2.dat │ ├── frame_2.png │ ├── frame_20.dat │ ├── frame_20.png │ ├── frame_21.dat │ ├── frame_21.png │ ├── frame_22.dat │ ├── frame_22.png │ ├── frame_23.dat │ ├── frame_23.png │ ├── frame_24.dat │ ├── frame_24.png │ ├── frame_25.dat │ ├── frame_25.png │ ├── frame_26.dat │ ├── frame_26.png │ ├── frame_27.dat │ ├── frame_27.png │ ├── frame_28.dat │ ├── frame_28.png │ ├── frame_29.dat │ ├── frame_29.png │ ├── frame_3.dat │ ├── frame_3.png │ ├── frame_30.dat │ ├── frame_30.png │ ├── frame_31.dat │ ├── frame_31.png │ ├── frame_32.dat │ ├── frame_32.png │ ├── frame_33.dat │ ├── frame_33.png │ ├── frame_34.dat │ ├── frame_34.png │ ├── frame_35.dat │ ├── frame_35.png │ ├── frame_36.dat │ ├── frame_36.png │ ├── frame_37.dat │ ├── frame_37.png │ ├── frame_38.dat │ ├── frame_38.png │ ├── frame_39.dat │ ├── frame_39.png │ ├── frame_4.dat │ ├── frame_4.png │ ├── frame_40.dat │ ├── frame_40.png │ ├── frame_5.dat │ ├── frame_5.png │ ├── frame_6.dat │ ├── frame_6.png │ ├── frame_7.dat │ ├── frame_7.png │ ├── frame_8.dat │ ├── frame_8.png │ ├── frame_9.dat │ ├── frame_9.png │ ├── mask_0 │ │ ├── mask_101_0.dat │ │ ├── mask_105_0.dat │ │ ├── mask_109_0.dat │ │ ├── mask_113_0.dat │ │ ├── mask_117_0.dat │ │ ├── mask_121_0.dat │ │ ├── mask_125_0.dat │ │ ├── mask_129_0.dat │ │ ├── mask_133_0.dat │ │ ├── mask_137_0.dat │ │ ├── mask_141_0.dat │ │ ├── mask_145_0.dat │ │ ├── mask_149_0.dat │ │ ├── mask_153_0.dat │ │ ├── mask_157_0.dat │ │ ├── mask_161_0.dat │ │ ├── mask_165_0.dat │ │ ├── mask_169_0.dat │ │ ├── mask_173_0.dat │ │ ├── mask_177_0.dat │ │ ├── mask_21_0.dat │ │ ├── mask_25_0.dat │ │ ├── mask_29_0.dat │ │ ├── mask_33_0.dat │ │ ├── mask_37_0.dat │ │ ├── mask_41_0.dat │ │ ├── mask_45_0.dat │ │ ├── mask_49_0.dat │ │ ├── mask_53_0.dat │ │ ├── mask_57_0.dat │ │ ├── mask_61_0.dat │ │ ├── mask_65_0.dat │ │ ├── mask_69_0.dat │ │ ├── mask_73_0.dat │ │ ├── mask_77_0.dat │ │ ├── mask_81_0.dat │ │ ├── mask_85_0.dat │ │ ├── mask_89_0.dat │ │ ├── mask_93_0.dat │ │ └── mask_97_0.dat │ ├── mask_1 │ │ ├── mask_101_1.dat │ │ ├── mask_105_1.dat │ │ ├── mask_109_1.dat │ │ ├── mask_113_1.dat │ │ ├── mask_117_1.dat │ │ ├── mask_121_1.dat │ │ ├── mask_125_1.dat │ │ ├── mask_129_1.dat │ │ ├── mask_133_1.dat │ │ ├── mask_137_1.dat │ │ ├── mask_141_1.dat │ │ ├── mask_145_1.dat │ │ ├── mask_149_1.dat │ │ ├── mask_153_1.dat │ │ ├── mask_157_1.dat │ │ ├── mask_161_1.dat │ │ ├── mask_165_1.dat │ │ ├── mask_169_1.dat │ │ ├── mask_173_1.dat │ │ ├── mask_177_1.dat │ │ ├── mask_21_1.dat │ │ ├── mask_25_1.dat │ │ ├── mask_29_1.dat │ │ ├── mask_33_1.dat │ │ ├── mask_37_1.dat │ │ ├── mask_41_1.dat │ │ ├── mask_45_1.dat │ │ ├── mask_49_1.dat │ │ ├── mask_53_1.dat │ │ ├── mask_57_1.dat │ │ ├── mask_61_1.dat │ │ ├── mask_65_1.dat │ │ ├── mask_69_1.dat │ │ ├── mask_73_1.dat │ │ ├── mask_77_1.dat │ │ ├── mask_81_1.dat │ │ ├── mask_85_1.dat │ │ ├── mask_89_1.dat │ │ ├── mask_93_1.dat │ │ └── mask_97_1.dat │ ├── mask_2 │ │ ├── mask_101_2.dat │ │ ├── mask_105_2.dat │ │ ├── mask_109_2.dat │ │ ├── mask_113_2.dat │ │ ├── mask_117_2.dat │ │ ├── mask_121_2.dat │ │ ├── mask_125_2.dat │ │ ├── mask_129_2.dat │ │ ├── mask_133_2.dat │ │ ├── mask_137_2.dat │ │ ├── mask_141_2.dat │ │ ├── mask_145_2.dat │ │ ├── mask_149_2.dat │ │ ├── mask_153_2.dat │ │ ├── mask_157_2.dat │ │ ├── mask_161_2.dat │ │ ├── mask_165_2.dat │ │ ├── mask_169_2.dat │ │ ├── mask_173_2.dat │ │ ├── mask_177_2.dat │ │ ├── mask_21_2.dat │ │ ├── mask_25_2.dat │ │ ├── mask_29_2.dat │ │ ├── mask_33_2.dat │ │ ├── mask_37_2.dat │ │ ├── mask_41_2.dat │ │ ├── mask_45_2.dat │ │ ├── mask_49_2.dat │ │ ├── mask_53_2.dat │ │ ├── mask_57_2.dat │ │ ├── mask_61_2.dat │ │ ├── mask_65_2.dat │ │ ├── mask_69_2.dat │ │ ├── mask_73_2.dat │ │ ├── mask_77_2.dat │ │ ├── mask_81_2.dat │ │ ├── mask_85_2.dat │ │ ├── mask_89_2.dat │ │ ├── mask_93_2.dat │ │ └── mask_97_2.dat │ ├── mask_3 │ │ ├── mask_101_3.dat │ │ ├── mask_105_3.dat │ │ ├── mask_109_3.dat │ │ ├── mask_113_3.dat │ │ ├── mask_117_3.dat │ │ ├── mask_121_3.dat │ │ ├── mask_125_3.dat │ │ ├── mask_129_3.dat │ │ ├── mask_133_3.dat │ │ ├── mask_137_3.dat │ │ ├── mask_141_3.dat │ │ ├── mask_145_3.dat │ │ ├── mask_149_3.dat │ │ ├── mask_153_3.dat │ │ ├── mask_157_3.dat │ │ ├── mask_161_3.dat │ │ ├── mask_165_3.dat │ │ ├── mask_169_3.dat │ │ ├── mask_173_3.dat │ │ ├── mask_177_3.dat │ │ ├── mask_21_3.dat │ │ ├── mask_25_3.dat │ │ ├── mask_29_3.dat │ │ ├── mask_33_3.dat │ │ ├── mask_37_3.dat │ │ ├── mask_41_3.dat │ │ ├── mask_45_3.dat │ │ ├── mask_49_3.dat │ │ ├── mask_53_3.dat │ │ ├── mask_57_3.dat │ │ ├── mask_61_3.dat │ │ ├── mask_65_3.dat │ │ ├── mask_69_3.dat │ │ ├── mask_73_3.dat │ │ ├── mask_77_3.dat │ │ ├── mask_81_3.dat │ │ ├── mask_85_3.dat │ │ ├── mask_89_3.dat │ │ ├── mask_93_3.dat │ │ └── mask_97_3.dat │ ├── mask_4 │ │ ├── mask_101_4.dat │ │ ├── mask_105_4.dat │ │ ├── mask_109_4.dat │ │ ├── mask_113_4.dat │ │ ├── mask_117_4.dat │ │ ├── mask_121_4.dat │ │ ├── mask_125_4.dat │ │ ├── mask_129_4.dat │ │ ├── mask_133_4.dat │ │ ├── mask_137_4.dat │ │ ├── mask_141_4.dat │ │ ├── mask_145_4.dat │ │ ├── mask_149_4.dat │ │ ├── mask_153_4.dat │ │ ├── mask_157_4.dat │ │ ├── mask_161_4.dat │ │ ├── mask_165_4.dat │ │ ├── mask_169_4.dat │ │ ├── mask_173_4.dat │ │ ├── mask_177_4.dat │ │ ├── mask_21_4.dat │ │ ├── mask_25_4.dat │ │ ├── mask_29_4.dat │ │ ├── mask_33_4.dat │ │ ├── mask_37_4.dat │ │ ├── mask_41_4.dat │ │ ├── mask_45_4.dat │ │ ├── mask_49_4.dat │ │ ├── mask_53_4.dat │ │ ├── mask_57_4.dat │ │ ├── mask_61_4.dat │ │ ├── mask_65_4.dat │ │ ├── mask_69_4.dat │ │ ├── mask_73_4.dat │ │ ├── mask_77_4.dat │ │ ├── mask_81_4.dat │ │ ├── mask_85_4.dat │ │ ├── mask_89_4.dat │ │ ├── mask_93_4.dat │ │ └── mask_97_4.dat │ ├── mask_5 │ │ ├── mask_101_5.dat │ │ ├── mask_105_5.dat │ │ ├── mask_109_5.dat │ │ ├── mask_113_5.dat │ │ ├── mask_117_5.dat │ │ ├── mask_121_5.dat │ │ ├── mask_125_5.dat │ │ ├── mask_129_5.dat │ │ ├── mask_133_5.dat │ │ ├── mask_137_5.dat │ │ ├── mask_141_5.dat │ │ ├── mask_145_5.dat │ │ ├── mask_149_5.dat │ │ ├── mask_153_5.dat │ │ ├── mask_157_5.dat │ │ ├── mask_161_5.dat │ │ ├── mask_165_5.dat │ │ ├── mask_169_5.dat │ │ ├── mask_173_5.dat │ │ ├── mask_177_5.dat │ │ ├── mask_21_5.dat │ │ ├── mask_25_5.dat │ │ ├── mask_29_5.dat │ │ ├── mask_33_5.dat │ │ ├── mask_37_5.dat │ │ ├── mask_41_5.dat │ │ ├── mask_45_5.dat │ │ ├── mask_49_5.dat │ │ ├── mask_53_5.dat │ │ ├── mask_57_5.dat │ │ ├── mask_61_5.dat │ │ ├── mask_65_5.dat │ │ ├── mask_69_5.dat │ │ ├── mask_73_5.dat │ │ ├── mask_77_5.dat │ │ ├── mask_81_5.dat │ │ ├── mask_85_5.dat │ │ ├── mask_89_5.dat │ │ ├── mask_93_5.dat │ │ └── mask_97_5.dat │ ├── mask_6 │ │ ├── mask_101_6.dat │ │ ├── mask_105_6.dat │ │ ├── mask_109_6.dat │ │ ├── mask_113_6.dat │ │ ├── mask_117_6.dat │ │ ├── mask_121_6.dat │ │ ├── mask_125_6.dat │ │ ├── mask_129_6.dat │ │ ├── mask_133_6.dat │ │ ├── mask_137_6.dat │ │ ├── mask_141_6.dat │ │ ├── mask_145_6.dat │ │ ├── mask_149_6.dat │ │ ├── mask_153_6.dat │ │ ├── mask_157_6.dat │ │ ├── mask_161_6.dat │ │ ├── mask_165_6.dat │ │ ├── mask_169_6.dat │ │ ├── mask_173_6.dat │ │ ├── mask_177_6.dat │ │ ├── mask_21_6.dat │ │ ├── mask_25_6.dat │ │ ├── mask_29_6.dat │ │ ├── mask_33_6.dat │ │ ├── mask_37_6.dat │ │ ├── mask_41_6.dat │ │ ├── mask_45_6.dat │ │ ├── mask_49_6.dat │ │ ├── mask_53_6.dat │ │ ├── mask_57_6.dat │ │ ├── mask_61_6.dat │ │ ├── mask_65_6.dat │ │ ├── mask_69_6.dat │ │ ├── mask_73_6.dat │ │ ├── mask_77_6.dat │ │ ├── mask_81_6.dat │ │ ├── mask_85_6.dat │ │ ├── mask_89_6.dat │ │ ├── mask_93_6.dat │ │ └── mask_97_6.dat │ └── mask_7 │ │ ├── mask_101_7.dat │ │ ├── mask_105_7.dat │ │ ├── mask_109_7.dat │ │ ├── mask_113_7.dat │ │ ├── mask_117_7.dat │ │ ├── mask_121_7.dat │ │ ├── mask_125_7.dat │ │ ├── mask_129_7.dat │ │ ├── mask_133_7.dat │ │ ├── mask_137_7.dat │ │ ├── mask_141_7.dat │ │ ├── mask_145_7.dat │ │ ├── mask_149_7.dat │ │ ├── mask_153_7.dat │ │ ├── mask_157_7.dat │ │ ├── mask_161_7.dat │ │ ├── mask_165_7.dat │ │ ├── mask_169_7.dat │ │ ├── mask_173_7.dat │ │ ├── mask_177_7.dat │ │ ├── mask_21_7.dat │ │ ├── mask_25_7.dat │ │ ├── mask_29_7.dat │ │ ├── mask_33_7.dat │ │ ├── mask_37_7.dat │ │ ├── mask_41_7.dat │ │ ├── mask_45_7.dat │ │ ├── mask_49_7.dat │ │ ├── mask_53_7.dat │ │ ├── mask_57_7.dat │ │ ├── mask_61_7.dat │ │ ├── mask_65_7.dat │ │ ├── mask_69_7.dat │ │ ├── mask_73_7.dat │ │ ├── mask_77_7.dat │ │ ├── mask_81_7.dat │ │ ├── mask_85_7.dat │ │ ├── mask_89_7.dat │ │ ├── mask_93_7.dat │ │ └── mask_97_7.dat ├── index.php ├── phpqrcode.php ├── qrbitstream.php ├── qrconfig.php ├── qrconst.php ├── qrencode.php ├── qrimage.php ├── qrinput.php ├── qrlib.php ├── qrmask.php ├── qrrscode.php ├── qrspec.php ├── qrsplit.php ├── qrtools.php └── tools │ ├── merge.bat │ ├── merge.php │ ├── merge.sh │ ├── merged_config.php │ └── merged_header.php ├── processlogin.php ├── sendticket.php ├── ticketshell.sql ├── url2action.php └── verifyticket.php /PasswordHash.php: -------------------------------------------------------------------------------- 1 | in 2004-2006 and placed in 8 | # the public domain. Revised in subsequent years, still public domain. 9 | # 10 | # There's absolutely no warranty. 11 | # 12 | # The homepage URL for this framework is: 13 | # 14 | # http://www.openwall.com/phpass/ 15 | # 16 | # Please be sure to update the Version line if you edit this file in any way. 17 | # It is suggested that you leave the main version number intact, but indicate 18 | # your project name (after the slash) and add your own revision information. 19 | # 20 | # Please do not change the "private" password hashing method implemented in 21 | # here, thereby making your hashes incompatible. However, if you must, please 22 | # change the hash type identifier (the "$P$") to something different. 23 | # 24 | # Obviously, since this code is in the public domain, the above are not 25 | # requirements (there can be none), but merely suggestions. 26 | # 27 | class PasswordHash { 28 | var $itoa64; 29 | var $iteration_count_log2; 30 | var $portable_hashes; 31 | var $random_state; 32 | 33 | function PasswordHash($iteration_count_log2, $portable_hashes) 34 | { 35 | $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'; 36 | 37 | if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31) 38 | $iteration_count_log2 = 8; 39 | $this->iteration_count_log2 = $iteration_count_log2; 40 | 41 | $this->portable_hashes = $portable_hashes; 42 | 43 | $this->random_state = microtime(); 44 | if (function_exists('getmypid')) 45 | $this->random_state .= getmypid(); 46 | } 47 | 48 | function get_random_bytes($count) 49 | { 50 | $output = ''; 51 | if (is_readable('/dev/urandom') && 52 | ($fh = @fopen('/dev/urandom', 'rb'))) { 53 | $output = fread($fh, $count); 54 | fclose($fh); 55 | } 56 | 57 | if (strlen($output) < $count) { 58 | $output = ''; 59 | for ($i = 0; $i < $count; $i += 16) { 60 | $this->random_state = 61 | md5(microtime() . $this->random_state); 62 | $output .= 63 | pack('H*', md5($this->random_state)); 64 | } 65 | $output = substr($output, 0, $count); 66 | } 67 | 68 | return $output; 69 | } 70 | 71 | function encode64($input, $count) 72 | { 73 | $output = ''; 74 | $i = 0; 75 | do { 76 | $value = ord($input[$i++]); 77 | $output .= $this->itoa64[$value & 0x3f]; 78 | if ($i < $count) 79 | $value |= ord($input[$i]) << 8; 80 | $output .= $this->itoa64[($value >> 6) & 0x3f]; 81 | if ($i++ >= $count) 82 | break; 83 | if ($i < $count) 84 | $value |= ord($input[$i]) << 16; 85 | $output .= $this->itoa64[($value >> 12) & 0x3f]; 86 | if ($i++ >= $count) 87 | break; 88 | $output .= $this->itoa64[($value >> 18) & 0x3f]; 89 | } while ($i < $count); 90 | 91 | return $output; 92 | } 93 | 94 | function gensalt_private($input) 95 | { 96 | $output = '$P$'; 97 | $output .= $this->itoa64[min($this->iteration_count_log2 + 98 | ((PHP_VERSION >= '5') ? 5 : 3), 30)]; 99 | $output .= $this->encode64($input, 6); 100 | 101 | return $output; 102 | } 103 | 104 | function crypt_private($password, $setting) 105 | { 106 | $output = '*0'; 107 | if (substr($setting, 0, 2) == $output) 108 | $output = '*1'; 109 | 110 | $id = substr($setting, 0, 3); 111 | # We use "$P$", phpBB3 uses "$H$" for the same thing 112 | if ($id != '$P$' && $id != '$H$') 113 | return $output; 114 | 115 | $count_log2 = strpos($this->itoa64, $setting[3]); 116 | if ($count_log2 < 7 || $count_log2 > 30) 117 | return $output; 118 | 119 | $count = 1 << $count_log2; 120 | 121 | $salt = substr($setting, 4, 8); 122 | if (strlen($salt) != 8) 123 | return $output; 124 | 125 | # We're kind of forced to use MD5 here since it's the only 126 | # cryptographic primitive available in all versions of PHP 127 | # currently in use. To implement our own low-level crypto 128 | # in PHP would result in much worse performance and 129 | # consequently in lower iteration counts and hashes that are 130 | # quicker to crack (by non-PHP code). 131 | if (PHP_VERSION >= '5') { 132 | $hash = md5($salt . $password, TRUE); 133 | do { 134 | $hash = md5($hash . $password, TRUE); 135 | } while (--$count); 136 | } else { 137 | $hash = pack('H*', md5($salt . $password)); 138 | do { 139 | $hash = pack('H*', md5($hash . $password)); 140 | } while (--$count); 141 | } 142 | 143 | $output = substr($setting, 0, 12); 144 | $output .= $this->encode64($hash, 16); 145 | 146 | return $output; 147 | } 148 | 149 | function gensalt_extended($input) 150 | { 151 | $count_log2 = min($this->iteration_count_log2 + 8, 24); 152 | # This should be odd to not reveal weak DES keys, and the 153 | # maximum valid value is (2**24 - 1) which is odd anyway. 154 | $count = (1 << $count_log2) - 1; 155 | 156 | $output = '_'; 157 | $output .= $this->itoa64[$count & 0x3f]; 158 | $output .= $this->itoa64[($count >> 6) & 0x3f]; 159 | $output .= $this->itoa64[($count >> 12) & 0x3f]; 160 | $output .= $this->itoa64[($count >> 18) & 0x3f]; 161 | 162 | $output .= $this->encode64($input, 3); 163 | 164 | return $output; 165 | } 166 | 167 | function gensalt_blowfish($input) 168 | { 169 | # This one needs to use a different order of characters and a 170 | # different encoding scheme from the one in encode64() above. 171 | # We care because the last character in our encoded string will 172 | # only represent 2 bits. While two known implementations of 173 | # bcrypt will happily accept and correct a salt string which 174 | # has the 4 unused bits set to non-zero, we do not want to take 175 | # chances and we also do not want to waste an additional byte 176 | # of entropy. 177 | $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; 178 | 179 | $output = '$2a$'; 180 | $output .= chr(ord('0') + $this->iteration_count_log2 / 10); 181 | $output .= chr(ord('0') + $this->iteration_count_log2 % 10); 182 | $output .= '$'; 183 | 184 | $i = 0; 185 | do { 186 | $c1 = ord($input[$i++]); 187 | $output .= $itoa64[$c1 >> 2]; 188 | $c1 = ($c1 & 0x03) << 4; 189 | if ($i >= 16) { 190 | $output .= $itoa64[$c1]; 191 | break; 192 | } 193 | 194 | $c2 = ord($input[$i++]); 195 | $c1 |= $c2 >> 4; 196 | $output .= $itoa64[$c1]; 197 | $c1 = ($c2 & 0x0f) << 2; 198 | 199 | $c2 = ord($input[$i++]); 200 | $c1 |= $c2 >> 6; 201 | $output .= $itoa64[$c1]; 202 | $output .= $itoa64[$c2 & 0x3f]; 203 | } while (1); 204 | 205 | return $output; 206 | } 207 | 208 | function HashPassword($password) 209 | { 210 | $random = ''; 211 | 212 | if (CRYPT_BLOWFISH == 1 && !$this->portable_hashes) { 213 | $random = $this->get_random_bytes(16); 214 | $hash = 215 | crypt($password, $this->gensalt_blowfish($random)); 216 | if (strlen($hash) == 60) 217 | return $hash; 218 | } 219 | 220 | if (CRYPT_EXT_DES == 1 && !$this->portable_hashes) { 221 | if (strlen($random) < 3) 222 | $random = $this->get_random_bytes(3); 223 | $hash = 224 | crypt($password, $this->gensalt_extended($random)); 225 | if (strlen($hash) == 20) 226 | return $hash; 227 | } 228 | 229 | if (strlen($random) < 6) 230 | $random = $this->get_random_bytes(6); 231 | $hash = 232 | $this->crypt_private($password, 233 | $this->gensalt_private($random)); 234 | if (strlen($hash) == 34) 235 | return $hash; 236 | 237 | # Returning '*' on error is safe here, but would _not_ be safe 238 | # in a crypt(3)-like function used _both_ for generating new 239 | # hashes and for validating passwords against existing hashes. 240 | return '*'; 241 | } 242 | 243 | function CheckPassword($password, $stored_hash) 244 | { 245 | $hash = $this->crypt_private($password, $stored_hash); 246 | if ($hash[0] == '*') 247 | $hash = crypt($password, $stored_hash); 248 | 249 | return $hash == $stored_hash; 250 | } 251 | } 252 | 253 | ?> 254 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | SMHack Ticket System 2 | ====== 3 | 4 | This is a PHP based ticketing system that allows us to add, edit, and activate events that in turn are offered to our community. Participants can pay for a ticket using PayPal. Tickets are given to participants in the form of a QR code. At the time of the event tickets are scanned and validated with a green screen or a red screen. QR codes are marked as used when scanned making them a one time use code. 5 | 6 | Upon activation of a submitted event a mechanism will send out valid tickets to dues paying members of the space. 7 | 8 | == Credit == 9 | 10 | We have implemented the PHP QR Code library which is located here: http://phpqrcode.sourceforge.net/. Using this library allows us to generate our QR codes that we send out. 11 | 12 | We have also implemented the Portable PHP password hashing framework for the backend. http://www.openwall.com/phpass/ 13 | 14 | == What's Needed == 15 | 16 | You will need to include the /ticket/sendticket.php file in your IPN (PayPal) file. Here is an example of how our ipn is handled. 17 | 18 | switch($txn_type){ 19 | case 'web_accept': 20 | if ($item_number == 'Class'){ 21 | include('./ticket/sendticket.php'); 22 | } 23 | break; 24 | } 25 | 26 | I suggest looking into the class here https://github.com/Quixotix/PHP-PayPal-IP to make your IPN intergration easier. 27 | -------------------------------------------------------------------------------- /addevent.php: -------------------------------------------------------------------------------- 1 | 2 | 44 | 45 | 46 |
-------------------------------------------------------------------------------- /addeventaction.php: -------------------------------------------------------------------------------- 1 | PREPARE("INSERT INTO Event ( title, startTime, endTime, location, description, agenda, aboutTeacher, isActive ) VALUES ( '$title' , '$startTime', '$endTime', '$location', '$description', '$agenda', '$aboutTeacher', 1 )"); 17 | $query->execute(); 18 | header('Location: index.php?action=admin'); 19 | ?> -------------------------------------------------------------------------------- /adminmain.php: -------------------------------------------------------------------------------- 1 |Event | 4 |Attendees | 5 |
---|---|
".$row['title']." | ".$row['attendeeCount']." |
Add event |
Description: ".$row['description']."
"; 17 | echo "Class will be held on ".$row['startTime']." until ".$row['endTime']." at ".$row['location']."
"; 18 | echo "Agenda: ".$row['agenda']."
"; 19 | echo "About the Teacher: ".$row['aboutTeacher']."
"; 20 | 21 | 22 | } 23 | ?> 24 | 25 | 37 | -------------------------------------------------------------------------------- /foot.php: -------------------------------------------------------------------------------- 1 | '; 3 | echo '