Posts: 6
Threads: 5
Joined: Mar 2010
Hi everyone
First of all, thank you for your reply to my question. I now have another problem. I tried to edit and save a page, but when I try to save something on a page (changedata.php) the page goes blank. Any ideas? It's not a permissions issue. I have 777 recursive to folders, backups and data.
Any ideas ?
Thanks in advance
Posts: 972
Threads: 27
Joined: Aug 2009
If you’re editting a page and the page was not previously created there on that server the page’s data file might have a permission problem.
Are you able to create new pages?
Does the screen go blank when saving or is it just that you lose data? If the screen goes blank you might want to enable debug mode and check for errors. You might want to do that anyway when editing a page to see whether GetSimple gives us any pointers as to where to look for the problem.
Posts: 18
Threads: 2
Joined: Aug 2010
2010-09-30, 00:42:01
(This post was last modified: 2010-09-30, 00:58:08 by spacez320.)
Just discovered, I have this same problem.
Editing existing pages throws up /admin/changedata.php as a blank page after pressing save.
The page saves, but I am not returned to the edit.
Debug mode says this:
Code: Warning: Cannot modify header information - headers already sent by (output started at /homepages/23/d79985469/htdocs/website/plugins/contact_form.php:1) in /homepages/23/d79985469/htdocs/website/admin/inc/cookie_functions.php on line 26
Warning: Cannot modify header information - headers already sent by (output started at /homepages/23/d79985469/htdocs/website/plugins/contact_form.php:1) in /homepages/23/d79985469/htdocs/website/admin/changedata.php on line 178
Any help much appreciated
Posts: 1,848
Threads: 86
Joined: Aug 2009
it looks to be a problem with the contact_form.php plugin. Can you remove that plugin from your site and see if the problem goes away?
- Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 18
Threads: 2
Joined: Aug 2010
Hi Chris,
Yes - the problem goes when the plugin is removed.
I really need the plugin to be installed though - do you have any idea what would be causing the errors?
Many thanks
Code: <?php
/*
Name: Simple Cumbe contact form
Description: Pues eso es un formulario de contacto simple
Version: 4.0
Author: Cumbe
Author URI: http://
*/
// Relative
$relative = '../';
$path = $relative. 'data/other/';
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
# register plugin
register_plugin(
$thisfile,
'Cumbe_contact',
'3.0',
'Cumbe',
'http://',
'Description: Getsimple contactform',
'plugins', //page type
'vermensajes'
);
//set internationalization
//$VIEWMESSAGE = 'Ver mensajes recibidos';
$VIEWMESSAGE = 'View contactform.log';
//añadimos a sidebar de pestaña plugins
add_action('plugins-sidebar','createSideMenu',array('contact_form',$VIEWMESSAGE));
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
function vermensajes(){
global $i18n;
$log_name = 'contactform.log';
$log_path = GSDATAOTHERPATH.'logs/';
$log_file = $log_path . $log_name;
if(file_exists($log_file)) {
$log_data = getXML($log_file);
if (@$_GET['action'] == 'delete' && strlen($log_name)>0) {
unlink($log_file);
exec_action('logfile_delete');
?>
<label>Log <?php echo $log_name;?> <?php echo $i18n['MSG_HAS_BEEN_CLR']; ?>
</div>
</div>
<div id="sidebar" >
<?php include('template/sidebar-plugins.php'); ?>
</div>
<div class="clear"></div>
</div>
<?php get_template('footer'); ?>
<?php
exit;
}
?>
<label><?php echo $i18n['VIEWING'];?> <?php echo $i18n['LOG_FILE'];?>: ‘<em><?php echo @$log_name; ?></em>’</label>
<div class="edit-nav" >
<a href="load.php?id=contact_form&action=delete" accesskey="c" title="<?php echo $i18n['CLEAR_ALL_DATA'];?> <?php echo $log_name; ?>?" /><?php echo $i18n['CLEAR_THIS_LOG'];?></a>
<div class="clear"></div>
</div>
<ol class="more" >
<?php
$count = 1;
foreach ($log_data as $log) {
echo '<li><p style="font-size:11px;line-height:15px;" ><b style="line-height:20px;" >'.$i18n['LOG_FILE_ENTRY'].'</b><br />';
foreach($log->children() as $child) {
$name = $child->getName();
echo '<b>'. stripslashes(ucwords($name)) .'</b>: ';
$d = $log->$name;
$n = strtolower($child->getName());
$ip_regex = '/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/';
$url_regex = @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)";
//check if its an url address
if (do_reg($d, $url_regex)) {
$d = '<a href="'. $d .'" target="_blank" >'.$d.'</a>';
}
//check if its an ip address
if (do_reg($d, $ip_regex)) {
if ($d == $_SERVER['REMOTE_ADDR']) {
$d = $i18n['THIS_COMPUTER'].' (<a href="http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress='. $d.'" target="_blank" >'.$d.'</a>)';
} else {
$d = '<a href="http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress='. $d.'" target="_blank" >'.$d.'</a>';
}
}
//check if its an email address
if (check_email_address($d)) {
$d = '<a href="mailto:'.$d.'">'.$d.'</a>';
}
//check if its a date
if ($n === 'date') {
$d = lngDate($d);
}
echo stripslashes($d);
echo ' <br />';
}
echo "</p></li>";
$count++;
}
?>
</ol>
<?php
}
else{ //If file does not exist
?>
<label><?php echo $i18n['MISSING_FILE']; ?>: ‘<em><?php echo @$log_name; ?></em>’</label>
<?php
}
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
function set_contact_page() {
global $EMAIL;
global $SITEURL;
if (file_exists('gsconfig.php')) {
include_once('gsconfig.php');
}
// Debugging
if (defined('GSDEBUG')){
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
} else {
error_reporting(0);
@ini_set('display_errors', 0);
}
$err = '';
if (file_exists(GSDATAOTHERPATH.'website.xml')) {
$dataw = getXML(GSDATAOTHERPATH.'website.xml');
$TIMEZONE = $dataw->TIMEZONE;
}
//Set Internationalization
//Traducción al español. Descomentar las siguientes lÃÂneas y comentar la traducción al inglés
/*
$MSG_CONTACTERR = 'Hubo un error enviando su correo electrónico';
$MSG_CAPTCHA_FAILED = 'Fallo en el Captcha, creemos que usted puede ser un robot de spam';
$CONTACT_FORM_SUB = 'EnvÃÂo de Formulario de Contacto';
$WHO = 'de';
$MSG_CONTACTSUC = 'Su mensaje ha sido enviado, gracias.';
*/
//Translate to english
$MSG_CAPTCHA_FAILED = 'Captcha failed, please try again';
$CONTACT_FORM_SUB = 'Contact Form Submission';
$WHO = 'from';
$MSG_CONTACTSUC = 'Your message has been sent';
$MSG_CONTACTERR = 'There was an error sending your email';
//translate words show in page
$Nb = 'Name: '; //Name
$Em = 'Email: ';
$Tm = 'Subject: '; //Subject, Tema
$Ms = 'Message:'; //Message
$Ev = 'Send message'; //Send message
if( function_exists('date_default_timezone_set') ) {
date_default_timezone_set(@$TIMEZONE);
}
if (file_exists(GSDATAOTHERPATH.'user.xml')) {
$data = getXML(GSDATAOTHERPATH.'user.xml');
$EMAIL = $data->EMAIL;
}
if (isset($_POST['contact-submit'])) {
$pot = file_get_contents(GSDATAUPLOADPATH.'string.txt');
if ( $pot == strtolower($_POST['contact']['pot']) ) {
$captcha = $_POST['contact']['pot'];
}
else {
$err .= "\n". $MSG_CAPTCHA_FAILED;
}
if ( $_POST['contact']['email'] != '' ) {
$from = $_POST['contact']['email'];
} else {
$from = 'no-reply@get-simple.info';
}
if ( $_POST['contact']['tema'] != '' ) {
$subject = $_POST['contact']['tema'];
} else {
$subject = $CONTACT_FORM_SUB;
}
if ($err == '' && trim($_POST['contact']['email']) !='' && trim($_POST['contact']['Mensaje']) !='') {
$server_name = getenv ("SERVER_NAME"); // Server Name
$request_uri = getenv ("REQUEST_URI"); // Requested URI
$headers = "From: ".$from."\r\n";
$headers .= "Return-Path: ".$from."\r\n";
$headers .= "Content-type: text/html\r\n";
$temp = $_POST['contact'];
$captcha = $_POST['contact']['pot'];
unset($temp['pot']);
unset($temp['contact-submit']);
unset($temp['submit']);
$body = $CONTACT_FORM_SUB.' '.$WHO.' http://'.$server_name.$request_uri.' <br />';
$body .= "-----------------------------------<br /><br />";
$xmlfile = "data/other/logs/contactform.log";
if ( ! file_exists($xmlfile) ) {
$xml = new SimpleXMLExtended('<channel></channel>');
} else
{
$xmldata = file_get_contents($xmlfile);
$xml = new SimpleXMLExtended($xmldata);
}
$thislog = $xml->addChild('entry');
$thislog->addChild('date', date('r'));
$cdata = $thislog->addChild('from');
$cdata->addCData($from);
$cdata = $thislog->addChild('subject');
$cdata->addCData(htmlentities($subject, ENT_QUOTES, 'UTF-8'));
$cdata = $thislog->addChild('captcha');
$cdata->addCData($captcha);
$cdata = $thislog->addChild('ip_address');
$ip = getenv("REMOTE_ADDR");
$cdata->addCData(htmlentities($ip, ENT_QUOTES, 'UTF-8'));
$body .= "Ip: ". $ip ."<br />";
foreach ( $temp as $key => $value ) {
$body .= ucfirst($key) .": ". $value ."<br />";
$cdata = $thislog->addChild(clean_url($key));
$cdata->addCData(htmlentities($value, ENT_QUOTES, 'UTF-8'));
}
$result = mail($EMAIL,$subject,$body,$headers);
XMLsave($xml, $xmlfile);
//results
if ($result=='1') {
echo '<p class="contactmsg success">'.$MSG_CONTACTSUC.'<br /><br /></p>';
} else {
echo '<p class="contactmsg error">'.$MSG_CONTACTERR.'</p>';
}
} else {
if (trim($err) !=''){
echo '<p class="contactmsg error">'.$err.'.<br />Captcha code: '.$pot.'<br / >Code wrote: '.$_POST['contact']['pot'].'</p>';
}
else {
echo '<font color="red">*** Required fields empty ***</font>';
}
}
}
//Show in page
?>
<form action="index.php?id=<?php get_page_slug(); ?>" method="post">
<p style="margin-bottom: 6px;"><label><?php echo $Nb; ?><br />
</label><input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[nombre]" /></p>
<p style="margin-bottom: 6px;">
<label><?php echo $Em; ?><br />
</label><input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[email]" /></p>
<p style="margin-bottom: 6px;"><label><?php echo $Tm; ?><br />
</label><input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[tema]" cols="60" /></p>
<p style="margin-bottom: 6px;">
<label><?php echo $Ms; ?></label><br /><textarea class="text" name="contact[Mensaje]" rows="7" cols="70"></textarea></p>
<p>
<label>CAPTCHA Code:</label>
<br />
<?php imgCtf_cp(); ?>
<img src= "<?php echo $SITEURL; ?>data/uploads/string.png" />
<br />
<input class="text" type="text" style="width: 130px; " value="" name="contact[pot]" />
</p>
<p><input type="submit" class="submit" value="<?php echo $Ev; ?>" id="contact-submit" name="contact-submit" /></p>
</form>
<?php
}
function imgCtf_cp(){
function randomText($length) {
$key = '';
$cadena = "123456789ABCDEFGHIJKLMNPQRSTUVWXYZ";
for($i=0;$i<$length;$i++) {
$key .= $cadena{rand(0,33)}.' ';
}
return $key;
}
$pot = randomText(4);
$im = imagecreate(105, 30);
// Colors
$rojo = imagecolorallocate($im, 151, 151, 151);
$blanco = imagecolorallocate($im, 255, 255, 255);
$gris = imagecolorallocate($im, 128, 128, 128);
$negro = imagecolorallocate($im, 0, 0, 0);
// Dibujar la imagen
imagefilledrectangle($im, 0, 0, 164, 29, $rojo);
imagestring($im, 6, 20, 11, $pot, $negro);
imagestring($im, 6, 16, 5, $pot, $blanco);
//if you want to difficult more the captcha discomment the next line.
//imageline($im, 10, 25, 155, 25, $blanco);
// Guardar la imagen
imagepng($im, GSDATAUPLOADPATH.'string.png');
imagedestroy($im);
//guardar el texto
$str_txt = fopen(GSDATAUPLOADPATH.'string.txt', 'w');
fwrite($str_txt, str_replace(' ','',trim(strtolower($pot))));
fclose ($str_txt);
}
?>
Posts: 357
Threads: 23
Joined: Dec 2009
Hi James;
I tested with the code that you have posted and I have not had any problems.
What version are you using of Getsimple?.
Regards
Posts: 357
Threads: 23
Joined: Dec 2009
With the plugin without modify, do you have any error?
Posts: 18
Threads: 2
Joined: Aug 2010
Strange. I just went back to the unmodified plugin, then modded one part at a time and now it works.
Thanks for your help.
I wonder if there is anything different in the code now:
Code: <?php
/*
Name: Simple Cumbe contact form
Description: Pues eso es un formulario de contacto simple
Version: 4.0
Author: Cumbe
Author URI: http://
*/
// Relative
$relative = '../';
$path = $relative. 'data/other/';
# get correct id for plugin
$thisfile=basename(__FILE__, ".php");
# register plugin
register_plugin(
$thisfile,
'Cumbe_contact',
'3.0',
'Cumbe',
'http://',
'Description: Getsimple contactform',
'plugins', //page type
'vermensajes'
);
//set internationalization
//$VIEWMESSAGE = 'Ver mensajes recibidos';
$VIEWMESSAGE = 'View contactform.log';
//añadimos a sidebar de pestaña plugins
add_action('plugins-sidebar','createSideMenu',array('contact_form',$VIEWMESSAGE));
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
function vermensajes(){
global $i18n;
$log_name = 'contactform.log';
$log_path = GSDATAOTHERPATH.'logs/';
$log_file = $log_path . $log_name;
if(file_exists($log_file)) {
$log_data = getXML($log_file);
if (@$_GET['action'] == 'delete' && strlen($log_name)>0) {
unlink($log_file);
exec_action('logfile_delete');
?>
<label>Log <?php echo $log_name;?> <?php echo $i18n['MSG_HAS_BEEN_CLR']; ?>
</div>
</div>
<div id="sidebar" >
<?php include('template/sidebar-plugins.php'); ?>
</div>
<div class="clear"></div>
</div>
<?php get_template('footer'); ?>
<?php
exit;
}
?>
<label><?php echo $i18n['VIEWING'];?> <?php echo $i18n['LOG_FILE'];?>: ‘<em><?php echo @$log_name; ?></em>’</label>
<div class="edit-nav" >
<a href="load.php?id=contact_form&action=delete" accesskey="c" title="<?php echo $i18n['CLEAR_ALL_DATA'];?> <?php echo $log_name; ?>?" /><?php echo $i18n['CLEAR_THIS_LOG'];?></a>
<div class="clear"></div>
</div>
<ol class="more" >
<?php
$count = 1;
foreach ($log_data as $log) {
echo '<li><p style="font-size:11px;line-height:15px;" ><b style="line-height:20px;" >'.$i18n['LOG_FILE_ENTRY'].'</b><br />';
foreach($log->children() as $child) {
$name = $child->getName();
echo '<b>'. stripslashes(ucwords($name)) .'</b>: ';
$d = $log->$name;
$n = strtolower($child->getName());
$ip_regex = '/^(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)(?:[.](?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)){3}$/';
$url_regex = @"((https?|ftp|gopher|telnet|file|notes|ms-help):((//)|(\\\\))+[\w\d:#@%/;$()~_?\+-=\\\.&]*)";
//check if its an url address
if (do_reg($d, $url_regex)) {
$d = '<a href="'. $d .'" target="_blank" >'.$d.'</a>';
}
//check if its an ip address
if (do_reg($d, $ip_regex)) {
if ($d == $_SERVER['REMOTE_ADDR']) {
$d = $i18n['THIS_COMPUTER'].' (<a href="http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress='. $d.'" target="_blank" >'.$d.'</a>)';
} else {
$d = '<a href="http://www.geobytes.com/IpLocator.htm?GetLocation&IpAddress='. $d.'" target="_blank" >'.$d.'</a>';
}
}
//check if its an email address
if (check_email_address($d)) {
$d = '<a href="mailto:'.$d.'">'.$d.'</a>';
}
//check if its a date
if ($n === 'date') {
$d = lngDate($d);
}
echo stripslashes($d);
echo ' <br />';
}
echo "</p></li>";
$count++;
}
?>
</ol>
<?php
}
else{ //If file does not exist
?>
<label><?php echo $i18n['MISSING_FILE']; ?>: ‘<em><?php echo @$log_name; ?></em>’</label>
<?php
}
}
////////////////////////////////////////////////
////////////////////////////////////////////////
////////////////////////////////////////////////
function set_contact_page() {
global $EMAIL;
global $SITEURL;
if (file_exists('gsconfig.php')) {
include_once('gsconfig.php');
}
// Debugging
if (defined('GSDEBUG')){
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 1);
} else {
error_reporting(0);
@ini_set('display_errors', 0);
}
$err = '';
if (file_exists(GSDATAOTHERPATH.'website.xml')) {
$dataw = getXML(GSDATAOTHERPATH.'website.xml');
$TIMEZONE = $dataw->TIMEZONE;
}
//Set Internationalization
//Traducción al español. Descomentar las siguientes lÃÂneas y comentar la traducción al inglés
/*
$MSG_CONTACTERR = 'Hubo un error enviando su correo electrónico';
$MSG_CAPTCHA_FAILED = 'Fallo en el Captcha, creemos que usted puede ser un robot de spam';
$CONTACT_FORM_SUB = 'EnvÃÂo de Formulario de Contacto';
$WHO = 'de';
$MSG_CONTACTSUC = 'Su mensaje ha sido enviado, gracias.';
*/
//Translate to english
$MSG_CAPTCHA_FAILED = 'Captcha failed, we think you are a spam bot';
$CONTACT_FORM_SUB = 'Contact Form Submission';
$WHO = 'from';
$MSG_CONTACTSUC = 'Your email has successfully been sent, thank you.';
$MSG_CONTACTERR = 'There was an error sending your message. Please check your details';
//translate words show in page
$Nb = 'Name: '; //Name
$Em = 'Email: ';
$Tm = 'Subject: '; //Subject, Tema
$Ms = 'Message:'; //Message
$Ev = 'Send message'; //Send message
if( function_exists('date_default_timezone_set') ) {
date_default_timezone_set(@$TIMEZONE);
}
if (file_exists(GSDATAOTHERPATH.'user.xml')) {
$data = getXML(GSDATAOTHERPATH.'user.xml');
$EMAIL = $data->EMAIL;
}
if (isset($_POST['contact-submit'])) {
$pot = file_get_contents(GSDATAUPLOADPATH.'string.txt');
if ( $pot == strtolower($_POST['contact']['pot']) ) {
$captcha = $_POST['contact']['pot'];
}
else {
$err .= "\n". $MSG_CAPTCHA_FAILED;
}
if ( $_POST['contact']['email'] != '' ) {
$from = $_POST['contact']['email'];
} else {
$from = 'no-reply@get-simple.info';
}
if ( $_POST['contact']['tema'] != '' ) {
$subject = $_POST['contact']['tema'];
} else {
$subject = $CONTACT_FORM_SUB;
}
if ($err == '' && trim($_POST['contact']['email']) !='' && trim($_POST['contact']['Mensaje']) !='') {
$server_name = getenv ("SERVER_NAME"); // Server Name
$request_uri = getenv ("REQUEST_URI"); // Requested URI
$headers = "From: ".$from."\r\n";
$headers .= "Return-Path: ".$from."\r\n";
$headers .= "Content-type: text/html\r\n";
$temp = $_POST['contact'];
$captcha = $_POST['contact']['pot'];
unset($temp['pot']);
unset($temp['contact-submit']);
unset($temp['submit']);
$body = $CONTACT_FORM_SUB.' '.$WHO.' http://'.$server_name.$request_uri.' <br />';
$body .= "-----------------------------------<br /><br />";
$xmlfile = "data/other/logs/contactform.log";
if ( ! file_exists($xmlfile) ) {
$xml = new SimpleXMLExtended('<channel></channel>');
} else
{
$xmldata = file_get_contents($xmlfile);
$xml = new SimpleXMLExtended($xmldata);
}
$thislog = $xml->addChild('entry');
$thislog->addChild('date', date('r'));
$cdata = $thislog->addChild('from');
$cdata->addCData($from);
$cdata = $thislog->addChild('subject');
$cdata->addCData(htmlentities($subject, ENT_QUOTES, 'UTF-8'));
$cdata = $thislog->addChild('captcha');
$cdata->addCData($captcha);
$cdata = $thislog->addChild('ip_address');
$ip = getenv("REMOTE_ADDR");
$cdata->addCData(htmlentities($ip, ENT_QUOTES, 'UTF-8'));
$body .= "Ip: ". $ip ."<br />";
foreach ( $temp as $key => $value ) {
$body .= ucfirst($key) .": ". $value ."<br />";
$cdata = $thislog->addChild(clean_url($key));
$cdata->addCData(htmlentities($value, ENT_QUOTES, 'UTF-8'));
}
$result = mail($EMAIL,$subject,$body,$headers);
XMLsave($xml, $xmlfile);
//results
if ($result=='1') {
echo '<p class="contactmsg success">'.$MSG_CONTACTSUC.'<br /><br /></p>';
} else {
echo '<p class="contactmsg error">'.$MSG_CONTACTERR.'</p>';
}
} else {
if (trim($err) !=''){
echo '<p class="contactmsg error">'.$err.'.<br />Captcha code: '.$pot.'<br / >Code wrote: '.$_POST['contact']['pot'].'</p>';
}
else {
echo '<font color="red">*** Required fields empty ***</font>';
}
}
}
//Show in page
?>
<form action="index.php?id=<?php get_page_slug(); ?>" method="post">
<p style="margin-bottom: 6px;"><label><?php echo $Nb; ?></label>
<br />
<input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[nombre]" /></p>
<p style="margin-bottom: 6px;">
<label><?php echo $Em; ?><br />
</label><input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[email]" /></p>
<p style="margin-bottom: 6px;"><label><?php echo $Tm; ?><br />
</label><input style="margin-left:2px; width: 400px;" type="text" class="text" name="contact[tema]" cols="60" /></p>
<p style="margin-bottom: 6px;">
<label><?php echo $Ms; ?><br />
</label><br /><textarea class="text" name="contact[Mensaje]" rows="7" cols="70"></textarea></p>
<p><label>CAPTCHA Code</label>
:
<br />
<?php imgCtf_cp(); ?>
<img src= "<?php echo $SITEURL; ?>data/uploads/string.png" /><br />
<input class="text" type="text" style="width: 130px;" value="" name="contact[pot]" />
</p>
<p><input type="submit" class="submit" value="<?php echo $Ev; ?>" id="contact-submit" name="contact-submit" /></p>
</form>
<?php
}
function imgCtf_cp(){
function randomText($length) {
$key = '';
$cadena = "123456789ABCDEFGHIJKLMNPQRSTUVWXYZ";
for($i=0;$i<$length;$i++) {
$key .= $cadena{rand(0,33)}.' ';
}
return $key;
}
$pot = randomText(4);
$im = imagecreate(100, 30);
// Colors
$rojo = imagecolorallocate($im, 131, 131, 131);
$blanco = imagecolorallocate($im, 255, 255, 255);
$gris = imagecolorallocate($im, 128, 128, 128);
$negro = imagecolorallocate($im, 0, 0, 0);
// Dibujar la imagen
imagefilledrectangle($im, 0, 0, 164, 29, $rojo);
imagestring($im, 6, 20, 11, $pot, $negro);
imagestring($im, 6, 16, 5, $pot, $blanco);
//if you want to difficult more the captcha discomment the next line.
//imageline($im, 10, 25, 155, 25, $blanco);
// Guardar la imagen
imagepng($im, GSDATAUPLOADPATH.'string.png');
imagedestroy($im);
//guardar el texto
$str_txt = fopen(GSDATAUPLOADPATH.'string.txt', 'w');
fwrite($str_txt, str_replace(' ','',trim(strtolower($pot))));
fclose ($str_txt);
}
?>
Posts: 357
Threads: 23
Joined: Dec 2009
you do three tests.
SAve the plugin with ANSI and test is you have a error.
SAve the plugin with UTF8 and test is you have a error.
SAve the plugin with UTF8-without BOM and test is you have a error.
REgards.
Posts: 8
Threads: 3
Joined: Oct 2010
I just experienced a really weird glitch with this problem myself. If I edited the contact_form.php file within it's original extraction location and uploaded via my ftp client then the page editing worked fine; however, if I moved the file to another folder, edited it and then uploaded it . . . . I ended up with the blank changedata.php page when I updated a page edit!!!
Now that doesn't make any sense . . . does it?
Too much lemon drizzle cake has gone to my head I think, I guess I've od'ed on lemons!! LOL
Posts: 357
Threads: 23
Joined: Dec 2009
buffff, I get lost in the void!! .
Yes, there is no sense...
Regards
Posts: 1
Threads: 0
Joined: Oct 2010
The same bug - blank screen on page edit.
Haven't investigated, but looks like some encoding problems.
(Without contact.php works fine.)
Posts: 972
Threads: 27
Joined: Aug 2009
fulnestio Wrote:The same bug - blank screen on page edit. Please enable debug mode to show errors.
Posts: 51
Threads: 6
Joined: Mar 2011
Page name (title) MUST be in english or
you must add permanent link (open properties) in english
also parmanent if you use friendly URL don't use "_" in "permanent link" use "-" instead
|