NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ // Vérification de sécurité if (!defined("WIKINI_VERSION")) { die("accès direct interdit"); } if ($this->HasAccess("write") && $this->HasAccess("read")) { if (isset($_POST["submit"]) && $_POST["submit"] != 'Aperçu') { define("CAPTCHA_INCLUDE", TRUE); include 'tools/captcha/captcha.php'; $crypt = cryptWord($textes[array_rand($textes)]); // afficher les champs de formulaire et de l'image $ChampsCaptcha = ' <br /> <h3>Vérification</h3> <div id="captcha"> <img src="tools/captcha/captcha.php?' . $crypt . '" alt="captcha" /> <div id="capt_f"> <p>Veuillez réecrire le mot présent dans l\'image si vous souhaitez <strong>sauvegarder la page</strong>.</p> <input type="hidden" name="captcha_hash" value="' . $crypt . '" /> <label><input type="text" name="captcha" value="" /> (actualisez la page si le mot est illisible)</label> </div> </div> '; $plugin_output_new = preg_replace('/\\<input name=\\"submit\\" type=\\"submit\\" value=\\"Sauver\\"/', $ChampsCaptcha . '<input name="submit" type="submit" value="Sauver"', $plugin_output_new); }
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -- */ // Vérification de sécurité if (!defined("WIKINI_VERSION")) { die("accès direct interdit"); } if ($this->HasAccess('comment')) { if (!empty($_POST['submit'])) { $submit = $_POST['submit']; } else { $submit = false; } define("CAPTCHA_INCLUDE", TRUE); include 'tools/captcha/captcha.php'; if (empty($_POST['captcha'])) { $this->SetMessage("Ce commentaire n\\'a pas été enregistré car vous n\\'avez pas entré le mot de vérification."); $this->Redirect($this->href()); } elseif (!empty($_POST['captcha'])) { $wdcrypt = cryptWord($_POST['captcha']); if ($wdcrypt != $_POST['captcha_hash']) { $this->SetMessage("Ce commentaire n\\'a pas été enregistré car le mot entré ne correspond pas..."); $this->Redirect($this->href()); } } }
function findWord($hash = NULL) { global $textes; if ($hash) { foreach ($textes as $text) { if ($hash == cryptWord($text)) { return $text; } } } return $textes[array_rand($textes)]; }