Changeset 46081
- Timestamp:
- 05/15/08 19:27:43 (2 months ago)
- Files:
-
- wp-submission/trunk/classes/submission/base.php (modified) (3 diffs)
- wp-submission/trunk/classes/submission/mail.html (added)
- wp-submission/trunk/classes/submission/template.html (modified) (1 diff)
- wp-submission/trunk/classes/submission/thanks.html (added)
- wp-submission/trunk/classes/testing (added)
- wp-submission/trunk/classes/testing/base.php (added)
- wp-submission/trunk/classes/testing/debug.php (added)
- wp-submission/trunk/classes/testing/style.html (added)
- wp-submission/trunk/classes/testing/template.html (added)
- wp-submission/trunk/style.css (deleted)
- wp-submission/trunk/wp_submission.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
wp-submission/trunk/classes/submission/base.php
r46072 r46081 1 1 <?php 2 class dc_submission_2_2_0 extends dc_base_2_ 2_0 {2 class dc_submission_2_2_0 extends dc_base_2_1_0 { 3 3 function init() 4 4 { … … 12 12 function submission($content,$match) 13 13 { 14 $page = $this->loadHTML('submission'); 15 $form = $this->loadHTML('submission_form'); 16 $page = str_replace('@@form@@',$form,$page); 17 $page = $this->debug($match,false).$page; 18 $content = str_replace($match['match'],$page,$content); 14 if ($match['attributes']['demo']=="true") 15 { 16 $newmatch = eregi_replace(' demo\s*=\s*\"true\"','',$match['match']); 17 $content=str_replace($match['match'],$newmatch,$content); 18 } 19 else 20 { 21 $c = $this->loadClass('wp_contact'); 22 $add = $this->loadHTML('submission'); 23 $add=str_replace('@@message@@',$_POST['contact']['message'],$add); 24 $subjects = split(',',$match['attributes']['subject']); 25 $add=str_replace('@@url@@',$_POST['submission']['url'],$add); 26 $add=str_replace('@@caption@@',$_POST['submission']['caption'],$add); 27 $add=str_replace('@@description@@',$_POST['submission']['description'],$add); 28 $show_captcha=true; 29 if($match['attributes']['antispam']=='no') 30 $show_captcha=false; 31 $allow_copy=true; 32 if($match['attributes']['allowcopy']=='no') 33 $allow_copy=false; 34 $form=$c->show($add,$show_captcha,$allow_copy); 35 if($form['valid']) 36 { 37 $page = $this->loadHTML('submission_thanks'); 38 //$this->send($match['attributes']); 39 } 40 else 41 { 42 $page = $form['page']; 43 } 44 $content=str_replace($match['match'],$page,$content); 45 } 19 46 return $content; 20 47 } … … 64 91 return $content; 65 92 } 93 66 94 function saveSubmission() 67 95 { wp-submission/trunk/classes/submission/template.html
r46072 r46081 1 <p class='thanks'>Please visit the site to see the submission form</p> 2 <p class="submission form"> 3 <p>Your Name</p> 4 <p>Your Email</p> 5 @@form@@ 6 <p>Human Response Check</p> 7 </p> 1 2 <fieldset class="link_url" style="border:none;"> 3 <legend><strong>Link URL</strong></legend> 4 <input name='submission[url]' style='width:300px;margin-top:5px' value='@@url@@' /> 5 </fieldset> 6 <fieldset class="link_caption" style="border:none;"> 7 <legend><strong>Link Caption</strong></legend> 8 <input name='submission[caption]' style='width:300px;margin-top:5px' value='@@caption@@' /> 9 </fieldset> 10 <fieldset class="description" style="border:none;"> 11 <legend><strong>description</strong></legend> 12 <textarea name='submission[description]' style='width:100%;height:100px;margin-top:5px'>@@description@@</textarea> 13 </fieldset> wp-submission/trunk/wp_submission.php
r46075 r46081 9 9 */ 10 10 require_once(dirname(__FILE__).'/library/classes/base.php'); 11 class DCodaSubmission extends dc_base_2_ 2_0 {11 class DCodaSubmission extends dc_base_2_1_0 { 12 12 function init() 13 13 {
