Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: Bėda su infusion.

Parašė arnoldasz· 2010 Lap. 30 22:11:12
#1

Taigi darau infusioną ir susiduriu su tokia problema. Paspaudus "submit" mane nukelia ne į tą puslapį ( nukelia į infusions/index.php ) štai mano forma:


 
echo "<form name = 'addmem' method = 'post' action = '".FUSION_SELF."' >
<table>
	<tr><td>Vardas</td><td><input type = 'text' name = 'add_mem_name' maxlength = '30'  /></td></tr>
    <tr><td>Slapyvardis</td><td><input type = 'text' name = 'add_mem_nick' maxlength = '30'  /></td></tr>
    <tr><td>Rangas</td><td><input type = 'text' name = 'add_mem_rank' maxlength = '30'  /></td></tr>
    <tr><td><center><input type = 'submit' name = 'add_new_mem' value = 'Add Member'  /></center></td></tr>
</table>
</form>";    


Vietoj FUSION_SELF bandžiau rašyti to paties php failo pavadinimą, bet niekas nepasikeičia. Lauksiu atsakymų.

Parašė custOm· 2010 Lap. 30 22:11:43
#2

tai imesk ir ano failo koda. sitas nieko nesako (bent jau man)

Parašė arnoldasz· 2010 Lap. 30 22:11:42
#3

Daugiau jokių failų neturėtų būti, o anas puslapis į kurį nukelia iš vis tuščias. Jei kas nors bus aiškiau va visas kodas:


 
<?php
/*-------------------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion Content Management System
| Copyright © 2002 - 2008 Nick Jones
| <a href='http://www.php-fusion.co.uk/' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk/</span></a>
+--------------------------------------------------------+
| Filename: clan_members_admin.php
| CVS Version: 1.00
| Author: Arnoldas
+--------------------------------------------------------+
| This program is released as free software under the
| Affero GPL license. You can redistribute it and/or
| modify it under the terms of this license which you
| can read by viewing the included agpl.txt or online
| at <a href='http://www.gnu.org/licenses/agpl.html.' target='_blank'><span style='color:005C5B'>www.gnu.org/licenses/agpl.html.</span></a> Removal of this
| copyright header is strictly prohibited without
| written permission from the original author(s).
+--------------------------------------------------------*/
require_once "../../maincore.php";
require_once THEMES."templates/admin_header.php";
 
include INFUSIONS."clan_members/infusion_db.php";
 
if (!checkrights("XXX") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }
 
// Check if locale file is available matching the current site locale setting.
if (file_exists(INFUSIONS."clan_members/locale/".$settings['locale'].".php")) {
	// Load the locale file matching the current site locale setting.
	include INFUSIONS."clan_members/locale/".$settings['locale'].".php";
} 
else 
{
	// Load the infusion's default locale file.
	include INFUSIONS."clan_members/locale/English.php";
}
 
if ( isset ( $_POST ['add_new_mem'] ) )
{
	$name = $_POST ['add_mem_name'];
	$nick = $_POST ['add_mem_nick'];
	$rank = $_POST ['add_mem_rank'];
 
	$r = mysql_query ( "INSERT INTO `".DB_INFUSION_TABLE."` ( `mem_name`, `mem_nick`, `mem_rank` ) VALUES ( '$name', '$nick', '$rank' )" );
 
/*	if ( !$r )
	{
		opentable( "Klaida" );
		echo "<center>Klaida: Naujo nario pridėjimo užklausa nepavyko!</center>";
		closetable();
	}
	else
	{
		opentable( "" );
		echo "<center>Naujas narys sėkmingai pridėtas!</center>";
		closetable();
	}*/
}
 
opentable( "Pridėti naują narį" );
 
echo "<form name = 'addmem' method = 'post' action = '".FUSION_SELF."' >
<table>
	<tr><td>Vardas</td><td><input type = 'text' name = 'add_mem_name' maxlength = '30'  /></td></tr>
    <tr><td>Slapyvardis</td><td><input type = 'text' name = 'add_mem_nick' maxlength = '30'  /></td></tr>
    <tr><td>Rangas</td><td><input type = 'text' name = 'add_mem_rank' maxlength = '30'  /></td></tr>
    <tr><td><center><input type = 'submit' name = 'add_new_mem' value = 'Add Member'  /></center></td></tr>
</table>
</form>";    
 
closetable();
 
require_once THEMES."templates/footer.php";
?>


Paspaudus informacija turi būti siunčiama į tą patį puslapį, o ne į kitą, bet kažkas ne taip.

Parašė arnoldasz· 2010 Gru. 2 20:12:10
#4

Susitvarkiau. Metė dėl šios eilutės:

if (!checkrights("XXX") || !defined("iAUTH") || $_GET['aid'] != iAUTH) { redirect("../index.php"); }


O formoje adresą nurodžiau be 'aid', tereikėjo padaryt:


$action = INFUSIONS."clan_members/clan_members_admin.php?aid=".$_GET['aid'];