close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

Has check unique been fixed in 1.0.5?

Thread began 6/25/2012 8:11 pm by Andrew Read | Last modified 6/27/2012 10:10 am by Andrew Read | 792 views | 3 replies

Andrew Read

Hi Ray,

I believe these are the parts you require:

This code happens BEFORE the insert behaviour.

php:
<?php 
if ((isset($_POST["Insert_x"]) || isset($_POST["Insert_x"])))  {
  
$WAFV_Redirect "".(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES))  ."?invalid=true";
  
$_SESSION['WAVT_sitepagesinsert_Errors'] = "";
  if (
$WAFV_Redirect == "")  {
    
$WAFV_Redirect $_SERVER["PHP_SELF"];
  }
  
$WAFV_Errors "";
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_name"])?$_POST["page_name"]:"") . "",true,1);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_vis"])?$_POST["page_vis"]:"") . "",true,2);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_title"])?$_POST["page_title"]:"") . "",true,3);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_link"])?$_POST["page_link"]:"") . "",true,4);
  
$WAFV_Errors .= WAValidateUnique(("site_adm"),$site_adm,$database_site_adm,"site_pages","pageID","none,none,NULL","0","page_link","',none,''","".((isset($_POST["page_link"]))?$_POST["page_link"]:"")  ."",true,5);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_linkName"])?$_POST["page_linkName"]:"") . "",true,11);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_order"])?$_POST["page_order"]:"") . "",true,6);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_body"])?$_POST["page_body"]:"") . "",true,7);
  
$WAFV_Errors .= WAValidateNM((isset($_POST["page_metaRevisit"])?$_POST["page_metaRevisit"]:"") . "",1,365,0,",.",false,8);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_parentID"])?$_POST["page_parentID"]:"") . "",true,9);
  
$WAFV_Errors .= WAValidateRQ((isset($_POST["page_editDate"])?$_POST["page_editDate"]:"") . "",true,10);

  if (
$WAFV_Errors != "")  {
    
PostResult($WAFV_Redirect,$WAFV_Errors,"sitepagesinsert");
  }
}
?>

This is after and within the form:

php:
<li class="formItem">
            <div class="formGroup">
                  <div class="lineGroup"> 
                     <div class="fullColumnGroup"><label for="page_link" class="sublabel" >Page Link Name:<span class="requiredIndicator">&nbsp;*</span></label>
                          <div class="errorGroup">
<div class="fieldPair">
                       <div class="fieldGroup">
                                        <span id="page_link_Spry">
                       <span>
  <input id="page_link" name="page_link" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("sitepagesinsert","page_link"):"")); ?>" class="formTextfield_Large" tabindex="5" onBlur="hideServerError('page_link_ServerError');">
                                            <span class="textfieldMinCharsMsg">Minimum number of characters not met.</span><span class="textfieldMaxCharsMsg">Exceeded maximum number of characters.</span><span class="textfieldRequiredMsg">Please enter a value.</span>
                                        </span>
                       </span>
<?php
if (ValidatedField('sitepagesinsert','sitepagesinsert'))  {
  if ((
strpos((",".ValidatedField("sitepagesinsert","sitepagesinsert").","), "," "4" ",") !== false || "4" == "") || (strpos((",".ValidatedField("sitepagesinsert","sitepagesinsert").","), "," "5" ",") !== false || "5" == ""))  {
    if (!(
false))  {
?><span class="serverInvalidState" id="page_link_ServerError">Please enter a value.</span><?php //WAFV_Conditional site-pages-insert.php sitepagesinsert(4,5:)
    
}
  }
}
?>
                       </div>
                       </div>



If you require more, start a ticket and I'll send you the full pages.

Thanks.

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...