Changeset 656078
- Timestamp:
- 01/21/2013 03:55:16 AM (13 years ago)
- Location:
- mj-contact-us/trunk
- Files:
-
- 6 added
- 8 edited
-
assets/default.png (added)
-
assets/times_new_yorker.ttf (added)
-
css/mj.css (modified) (1 diff)
-
files/file.php (added)
-
files/includes.php (modified) (1 diff)
-
files/mj-class-functions.php (added)
-
files/mj-class-html.php (modified) (3 diffs)
-
files/mj-class-process.php (modified) (1 diff)
-
files/simple-php-captcha.php (added)
-
files/times_new_yorker.ttf (added)
-
index.php (modified) (2 diffs)
-
readme.txt (modified) (3 diffs)
-
screenshot-1.jpg (modified) (previous)
-
screenshot-3.jpg (modified) (previous)
Legend:
- Unmodified
- Added
- Removed
-
mj-contact-us/trunk/css/mj.css
r654989 r656078 141 141 .h-100{height:100px;} 142 142 .f-13{font-size:13px;} 143 .error{background-color: #e77776; color: #f2f2f2} -
mj-contact-us/trunk/files/includes.php
r654989 r656078 11 11 DEFINE('ACTION' , $atn); 12 12 13 include( plugin_dir_path( __FILE__ ) . '/mj-class-process.php'); 13 include( plugin_dir_path( __FILE__ ) . '/simple-php-captcha.php'); 14 include( plugin_dir_path( __FILE__ ) . '/mj-class-functions.php'); 15 include( plugin_dir_path( __FILE__ ) . '/mj-class-process.php'); 14 16 include( plugin_dir_path( __FILE__ ) . '/mj-class-html.php'); 15 17 -
mj-contact-us/trunk/files/mj-class-html.php
r654989 r656078 5 5 ?> 6 6 <div> 7 <?php if(isset($_REQUEST['MSG']) && $_REQUEST['MSG']=="SUCCESS"){8 echo "<div class='updatedcss' id='message'> Mail Sent Successfully</div>";9 }10 ?>11 7 12 8 <script type="text/javascript"> … … 52 48 </div> 53 49 <?php endif; ?> 50 <?php //if(get_option('MJCapcha')==0):?> 51 <div class="h-71"> 52 <label for="message"><?php _e('Captcha : '. MjFunctions::MathCaptcha()) ;?></label> 53 <input id="captcha" required name="captcha" type="text" value="" aria-required="true"> 54 </div> 55 <input type="hidden" name="CODEINCODE" value="<?php echo MjFunctions::BaseIncode(); ?>"> 56 <?php //endif; ?> 54 57 <div> 55 <input name="mj_submit" type="submit" id="submit" value="<?php _e('Send') ;?>"> 58 59 60 <input name="mj_submit" type="submit" id="submit" value="<?php _e('Send') ;?>"> 56 61 <input type="hidden" name="mj_submit" value="active"> 57 62 <input type="hidden" name="page_id" value="<?php echo $post->ID; ?>"> 63 58 64 </div> 59 65 </form> … … 61 67 </div> 62 68 <?php 63 64 69 } 65 70 function AdminOption(){ ?> -
mj-contact-us/trunk/files/mj-class-process.php
r654989 r656078 2 2 3 3 public static function send_mail(){ 4 if(isset($_REQUEST['mj_submit']) && $_REQUEST['mj_submit']=="active"){ 5 self::copytome(); 6 $name = strip_tags($_REQUEST['uname']); 7 $email = $_REQUEST['email']; 8 $subject = strip_tags($_REQUEST['subject']); 9 $url = strip_tags($_REQUEST['url']); 10 $comment = strip_tags($_REQUEST['comment']); 11 $to = (get_option('MJmailto')) ? get_option('MJmailto') : get_option('admin_email'); 12 $subject = (empty($subject))? "Contact Us mail" : $subject; 13 $message = " 14 <html> 15 <head> 16 <title>Contact US Mail</title> 17 </head> 18 <body> 19 <p>Hello Admin<br/></p> 20 <p>Please find the details of contact us mail send by a new user</p> 21 <p>=============================================================</p> 22 <table> 23 <tr> 24 <th>Name : </th> 25 <td>{$name}</td> 26 </tr> 27 <tr> 28 <th>Email : </th> 29 <td>{$email}</td> 30 </tr> 31 <tr> 32 <th>Subject : </th> 33 <td>{$subject}</td> 34 </tr> 35 <tr> 36 <th>Website : </th> 37 <td>{$url}</td> 38 </tr> 39 <tr> 40 <th>Comment : </th> 41 <td>{$comment}</td> 42 </tr> 43 </table> 44 <p>=============================================================</p> 45 <p>Thanks & Regards</p> 46 </body> 47 </html> 48 "; 49 $headers = 'MIME-Version: 1.0' . "\r\n"; 50 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 51 $headers .= 'From: '.$to.'' . "\r\n" . 52 'Reply-To: '.$to.'' . "\r\n" . 53 'X-Mailer: PHP/' . phpversion(); 54 55 wp_mail($to,$subject,$message,$headers); 56 $redirecturl = add_query_arg( 'MSG', 'SUCCESS', get_permalink($_REQUEST['page_id']) ); 57 echo "<script>window.location.href='$redirecturl'</script>"; 58 59 } 4 if(isset($_POST['mj_submit']) && $_POST['mj_submit']=="active"){ 5 if($_REQUEST['captcha'] == MjFunctions::BaseDecode($_POST['CODEINCODE'])){ 6 self::copytome(); 7 $name = strip_tags($_REQUEST['uname']); 8 $email = $_REQUEST['email']; 9 $subject = strip_tags($_REQUEST['subject']); 10 $url = strip_tags($_REQUEST['url']); 11 $comment = strip_tags($_REQUEST['comment']); 12 $to = (get_option('MJmailto')) ? get_option('MJmailto') : get_option('admin_email'); 13 $subject = (empty($subject))? "Contact Us mail" : $subject; 14 $message = " 15 <html> 16 <head> 17 <title>Contact US Mail</title> 18 </head> 19 <body> 20 <p>Hello Admin<br/></p> 21 <p>Please find the details of contact us mail send by a new user</p> 22 <p>=============================================================</p> 23 <table> 24 <tr> 25 <th>Name : </th> 26 <td>{$name}</td> 27 </tr> 28 <tr> 29 <th>Email : </th> 30 <td>{$email}</td> 31 </tr> 32 <tr> 33 <th>Subject : </th> 34 <td>{$subject}</td> 35 </tr> 36 <tr> 37 <th>Website : </th> 38 <td>{$url}</td> 39 </tr> 40 <tr> 41 <th>Comment : </th> 42 <td>{$comment}</td> 43 </tr> 44 </table> 45 <p>=============================================================</p> 46 <p>Thanks & Regards</p> 47 </body> 48 </html> 49 "; 50 $headers = 'MIME-Version: 1.0' . "\r\n"; 51 $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; 52 $headers .= 'From: '.$to.'' . "\r\n" . 53 'Reply-To: '.$to.'' . "\r\n" . 54 'X-Mailer: PHP/' . phpversion(); 55 56 wp_mail($to,$subject,$message,$headers); 57 echo "<div class='updatedcss' id='message'> Mail Sent Successfully</div>"; 58 }else{ 59 echo "<div class='error p-12' id='message'>Invalid Captcha</div>"; 60 } 61 } 60 62 } 61 63 -
mj-contact-us/trunk/index.php
r654989 r656078 5 5 Description: mj contact us a simple form with 4-5 fields to send email address to admin . its a simple contact us form with easy to customize coding standard and easy to customize html standard. <strong>add this code</strong> [mjcontactus] <strong>in page from admin section to activate plugin form also be sure that you have get_header() function in your header file so that validation can be work properly</strong> 6 6 Author: anil kumar 7 Version: 5. 27 Version: 5.1 8 8 Author URI: http://about.me/anilDhiman 9 9 */ … … 29 29 function mj_contact_us(){ 30 30 $object = new mjContactHTML; 31 $object->mjForm();32 $object->send_mail();31 $object->send_mail(); 32 $object->mjForm(); 33 33 } 34 34 function AdminIndex(){ -
mj-contact-us/trunk/readme.txt
r655312 r656078 2 2 Contributors: anildhiman 3 3 Donate link: http://mecontact.wordpress.com/mj-contact-us-plugin/ 4 Tags: contact us, simple and easy contact us form, contact us form, contact form, wordpress contact form, wordpress simple contact us form, javascript 5 contact us form, customizable contact us form 4 Tags: contact us, simple and easy contact us form, contact us form, contact form, wordpress contact form, wordpress simple contact us form, javascript contact us form, customizable contact us form, captcha contact us form, numeric captcha 6 5 Requires at least: 3.0.1 7 6 Tested up to: 3.5 … … 27 26 <li> - easy to add new fields by customising form</li> 28 27 <li> - easy to understand coding standard</li> 28 <li> - contact us with numeric captcha</li> 29 29 </ul> 30 30 … … 63 63 * added admin options 64 64 * validations are optional 65 65 * introduce numeric captcha. like 12 + 2 - 4 = ? 66 66 67 = 5.1 = 67 68 * add the jquery validation
Note: See TracChangeset
for help on using the changeset viewer.