Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: process.php

Parašė megar· 2011 Bal. 26 16:04:53
#1

Bandau perdaryti moda is v6 i v7 ir neveikia miktukas vienas neisiraso i dom baze informacija ... kas labiau susipazines su php-f gal gali padeti pritaikyti sita koda ant v7

<?php
/*--------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 - Content Management System    |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
|---------------------------------------------|
| Thanks to Ian Unruh (Kep7) for some         |
| cool code in this mod.		      |
| Website: <a href='http://www.cgeagles.com' target='_blank'><span style='color:005C5B'>http://www.cgeagles.com</span></a>            |
| Mods to the mod : Domi & Fetloser	      |
| Website: <a href='http://phpfusion.se' target='_blank'><span style='color:005C5B'>http://phpfusion.se</span></a>                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
 
require_once "../../maincore.php";
 
if ((iMEMBER) && isset($user_status)) {
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_status WHERE user_id=".$userdata['user_id'].""));
if (isset($data['stats'])){
$result = dbquery("UPDATE ".$db_prefix."user_status SET stats = '$user_status' WHERE user_id='".$userdata['user_id']."'");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."user_status VALUES('".$userdata['user_id']."', '$user_status', '$user_mood')");
 
}
}
 
if ((iMEMBER) && isset($user_mood)) {
$data = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_status WHERE user_id=".$userdata['user_id'].""));
if (isset($data['mood'])){
$result = dbquery("UPDATE ".$db_prefix."user_status SET mood = '$user_mood' WHERE user_id='".$userdata['user_id']."'");
} else {
$result = dbquery("INSERT INTO ".$db_prefix."user_status VALUES('".$userdata['user_id']."','$user_status', '$user_mood')");
 
}
}
 
header("Location:../../index.php");
?>
 
 

Parašė Mantas_· 2011 Bal. 26 17:04:26
#2

o kokia klaidą meta?

Parašė Zeck· 2011 Bal. 26 17:04:18
#3


<?php
 
/*--------------------------------------------+
 
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 - Content Management System    |
 
|---------------------------------------------|
 
| author: Nick Jones (Digitanium) © 2002-2005 |
 
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
 
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
 
|---------------------------------------------|
 
| Thanks to Ian Unruh (Kep7) for some         |
 
| cool code in this mod.		      |
 
| Website: <a href='http://www.cgeagles.com' target='_blank'><span style='color:005C5B'>http://www.cgeagles.com</span></a>            |
 
| Mods to the mod : Domi & Fetloser	      |
 
| Website: <a href='http://phpfusion.se' target='_blank'><span style='color:005C5B'>http://phpfusion.se</span></a>                |
 
|---------------------------------------------|
 
| Released under the terms and conditions of  |
 
| the GNU General Public License (Version 2)  |
 
+--------------------------------------------*/
 
 
 
require_once "../../maincore.php";
 
 
 
if ((iMEMBER) && isset($user_status)) {
 
$data = dbarray(dbquery("SELECT * FROM ".DB_USER_STATUS." WHERE user_id=".$userdata['user_id'].""));
 
if (isset($data['stats'])){
 
$result = dbquery("UPDATE ".DB_USER_STATUS." SET stats = '$user_status' WHERE user_id='".$userdata['user_id']."'");
 
} else {
 
$result = dbquery("INSERT INTO ".DB_USER_STATUS." VALUES('".$userdata['user_id']."', '$user_status', '$user_mood')");
 
 
 
}
 
}
 
 
 
if ((iMEMBER) && isset($user_mood)) {
 
$data = dbarray(dbquery("SELECT * FROM ".DB_USER_STATUS." WHERE user_id=".$userdata['user_id'].""));
 
if (isset($data['mood'])){
 
$result = dbquery("UPDATE ".DB_USER_STATUS." SET mood = '$user_mood' WHERE user_id='".$userdata['user_id']."'");
 
} else {
 
$result = dbquery("INSERT INTO ".DB_USER_STATUS." VALUES('".$userdata['user_id']."','$user_status', '$user_mood')");
 
 
 
}
 
}
 
 
 
header("Location:../../index.php");
 
?>
 
 
 
 

Redagavo Zeck· 2011 Bal. 26 17:04:51

Parašė megar· 2011 Bal. 26 18:04:07
#4


Na ir niekaip neveikia scriptas nors juokiu erroru nemeta , tiksliau viskas veikia tik neisiraso i domenu baze duomenis :( , nezinau jau ka galima koreguoti .
liko infusions.php 
 
<?php
/*--------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 - Content Management System    |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
|---------------------------------------------|
| Thanks to Ian Unruh (Kep7) for some         |
| cool code in this mod.		      |
| Website: <a href='http://www.cgeagles.com' target='_blank'><span style='color:005C5B'>http://www.cgeagles.com</span></a>            |
| Mods to the mod : Domi & Fetloser	      |
| Website: <a href='http://phpfusion.se' target='_blank'><span style='color:005C5B'>http://phpfusion.se</span></a>                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
 
if (!defined("IN_FUSION") || !checkrights("I")) { header("Location: ../../index.php"); exit; }
 
// Infusion general information
$inf_title = "Nario nuotaika ir statusas";
$inf_description = "Narys gali pasirinkti status&#224; ir nuotaik&#224;. J&#224; rodys profilyje.";
$inf_version = "1.00";
$inf_developer = "Domi & Fetloser";
$inf_email = "";
$inf_weburl = "http://phpfusion.se";
 
$inf_folder = "user_status"; // The folder in which the infusion resides.
$inf_admin_image = "inget_humo.gif"; // Leave blank to use the default image.
$inf_admin_panel = "http://db.veikla.info/administration/index.php"; // The admin panel filename if required.
 
$inf_link_name = ""; // if not required replace $locale['xxx102']; with "";
$inf_link_url = "http://db.veikla.info/profile.php?lookup=1"; // The filename you wish to link to.
$inf_link_visibility = "101"; // 0 - Guest / 101 - Member / 102 - Admin / 103 - Super Admin.
 
$inf_newtables = 1; // Number of new db tables to create or drop.
$inf_insertdbrows = 1; // Numbers rows added into created db tables.
$inf_altertables = 1; // Number of db tables to alter (upgrade).
$inf_deldbrows = 1; // Number of db tables to delete data from.
 
// Delete any items not required here.
$inf_droptable_[0] = "user_status";
 
$inf_newtable_[1] = "user_status (
user_id SMALLINT(5) UNSIGNED NOT NULL,
stats VARCHAR(200) DEFAULT '' NOT NULL,
mood VARCHAR(10) DEFAULT '' NOT NULL
) TYPE=MyISAM;";
 
?>
 
 


ir user_status_panel.php


<?php
/*--------------------------------------------+
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 - Content Management System    |
|---------------------------------------------|
| author: Nick Jones (Digitanium) © 2002-2005 |
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
|---------------------------------------------|
| Thanks to Ian Unruh (Kep7) for some         |
| cool code in this mod.		      |
| Website: <a href='http://www.cgeagles.com' target='_blank'><span style='color:005C5B'>http://www.cgeagles.com</span></a>            |
| Mods to the mod : Domi & Fetloser	      |
| Website: <a href='http://phpfusion.se' target='_blank'><span style='color:005C5B'>http://phpfusion.se</span></a>                |
|---------------------------------------------|
| Released under the terms and conditions of  |
| the GNU General Public License (Version 2)  |
+--------------------------------------------*/
 
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
 
 
 
if (!defined("LANGUAGE")) {
// PHPFusion environment
$this_lang =  str_replace("/", "", LOCALESET);
	if (file_exists(INFUSIONS."user_status/locale/".$this_lang.".php")) {
	   include INFUSIONS."user_status/locale/".$this_lang.".php";
	} else {
	   include INFUSIONS."user_status/locale/Lithuanian.php";
	}
        } else {
// mFusion environment
$this_lang =  LANGUAGE;
	if (file_exists(INFUSIONS."user_status/locale/".$this_lang.".php")) {
	   include INFUSIONS."user_status/locale/".$this_lang.".php";
	} else {
	   include INFUSIONS."user_status/locale/Lithuanian.php";
	}
}
 
 
openside($locale['usi103']);
if (iMEMBER) {
	$stats = dbarray(dbquery("SELECT * FROM ".$db_prefix."user_status WHERE user_id=".$userdata['user_id'].""));
	$user_status = $stats['stats'] != "" ? $stats['stats'] : "".$locale['usi125']."";
	$user_mood = $stats['mood'];	
 
echo "
<center>
<font color='#880000'> ° </font><b> ".$locale['usi101']." </b><font color='#880000'> ° </font></span></a>
	<form name='user_status' method='post'  action='".INFUSIONS."user_status/proccess.php'>
	<input name='user_status' type='textbox' maxlength='200' size='18'  value='".$user_status."' class='textbox'>
	<input type='submit' value='".$locale['usi105']."' name='submit' class='button'></center><hr></form>";
echo "
<center>
<font color='#880000'> ° </font><b> ".$locale['usi106']." <font color='#880000'> ° </font></b></a>
<form name='user_mood' method='post'  action='".INFUSIONS."user_status/proccess.php'>
	<input name='user_mood' type='hidden' value='".$user_mood."' >
<select name=\"user_mood\" class='small' id=\"user_mood\">
".$locale['usi106']."
	<option value=\"Inget_Humo\">".$locale['usi109']."</option>
	<option value=\"Glad\">".$locale['usi110']."</option>
        <option value=\"Arg\">".$locale['usi111']."</option>
        <option value=\"Ledsen\">".$locale['usi112']."</option>
        <option value=\"Forvirrad\">".$locale['usi113']."</option>
        <option value=\"Kramig\">".$locale['usi114']."</option>
        <option value=\"Retsam\">".$locale['usi115']."</option>
        <option value=\"Osaker\">".$locale['usi116']."</option>
        <option value=\"Positiv\">".$locale['usi117']."</option>
        <option value=\"Kar\">".$locale['usi118']."</option>
        <option value=\"Dalig\">".$locale['usi119']."</option>
        <option value=\"Seg\">".$locale['usi120']."</option>
        <option value=\"Trott\">".$locale['usi121']."</option>
       </select>
 
	<input type='submit' value='".$locale['usi105']."' name='submit' class='button'>
<br><br>
<img height='30' width='30' src='".BASEDIR."images/mood".$user_mood.".gif'>
</center></form>";
} else {
	echo $locale['usi108'];
}
closeside();
?>

Parašė Mantas_· 2011 Bal. 26 18:04:38
#5

Per daug nori :D

Parašė Zeck· 2011 Bal. 26 18:04:10
#6


<?php
 
/*--------------------------------------------+
 
| <span style="border-bottom: 1px dotted black;">PHP</span>-Fusion 6 - Content Management System    |
 
|---------------------------------------------|
 
| author: Nick Jones (Digitanium) © 2002-2005 |
 
| web: <a href='http://www.php-fusion.co.uk' target='_blank'><span style='color:005C5B'>http://www.php-fusion.co.uk</span></a>            |
 
| email: <a href="mailto:nick@php-fusion.co.uk"><span style="color:005C5B">nick@php-fusion.co.uk</span></a>                |
 
|---------------------------------------------|
 
| Thanks to Ian Unruh (Kep7) for some         |
 
| cool code in this mod.		      |
 
| Website: <a href='http://www.cgeagles.com' target='_blank'><span style='color:005C5B'>http://www.cgeagles.com</span></a>            |
 
| Mods to the mod : Domi & Fetloser	      |
 
| Website: <a href='http://phpfusion.se' target='_blank'><span style='color:005C5B'>http://phpfusion.se</span></a>                |
 
|---------------------------------------------|
 
| Released under the terms and conditions of  |
 
| the GNU General Public License (Version 2)  |
 
+--------------------------------------------*/
 
 
 
if (!defined("IN_FUSION")) { header("Location:../../index.php"); exit; }
 
 
 
 
 
 
 
if (!defined("LANGUAGE")) {
 
// PHPFusion environment
 
$this_lang =  str_replace("/", "", LOCALESET);
 
	if (file_exists(INFUSIONS."user_status/locale/".$this_lang.".php")) {
 
	   include INFUSIONS."user_status/locale/".$this_lang.".php";
 
	} else {
 
	   include INFUSIONS."user_status/locale/Lithuanian.php";
 
	}
 
        } else {
 
// mFusion environment
 
$this_lang =  LANGUAGE;
 
	if (file_exists(INFUSIONS."user_status/locale/".$this_lang.".php")) {
 
	   include INFUSIONS."user_status/locale/".$this_lang.".php";
 
	} else {
 
	   include INFUSIONS."user_status/locale/Lithuanian.php";
 
	}
 
}
 
 
 
 
 
openside($locale['usi103']);
 
if (iMEMBER) {
 
	$stats = dbarray(dbquery("SELECT * FROM ".DB_USER_STATUS." WHERE user_id=".$userdata['user_id'].""));
 
	$user_status = $stats['stats'] != "" ? $stats['stats'] : "".$locale['usi125']."";
 
	$user_mood = $stats['mood'];	
 
 
 
echo "
 
<center>
 
<font color='#880000'> ° </font><b> ".$locale['usi101']." </b><font color='#880000'> ° </font></span></a>
 
	<form name='user_status' method='post'  action='".INFUSIONS."user_status/proccess.php'>
 
	<input name='user_status' type='textbox' maxlength='200' size='18'  value='".$user_status."' class='textbox'>
 
	<input type='submit' value='".$locale['usi105']."' name='submit' class='button'></center><hr></form>";
 
echo "
 
<center>
 
<font color='#880000'> ° </font><b> ".$locale['usi106']." <font color='#880000'> ° </font></b></a>
 
<form name='user_mood' method='post'  action='".INFUSIONS."user_status/proccess.php'>
 
	<input name='user_mood' type='hidden' value='".$user_mood."' >
 
<select name=\"user_mood\" class='small' id=\"user_mood\">
 
".$locale['usi106']."
 
	<option value=\"Inget_Humo\">".$locale['usi109']."</option>
 
	<option value=\"Glad\">".$locale['usi110']."</option>
 
        <option value=\"Arg\">".$locale['usi111']."</option>
 
        <option value=\"Ledsen\">".$locale['usi112']."</option>
 
        <option value=\"Forvirrad\">".$locale['usi113']."</option>
 
        <option value=\"Kramig\">".$locale['usi114']."</option>
 
        <option value=\"Retsam\">".$locale['usi115']."</option>
 
        <option value=\"Osaker\">".$locale['usi116']."</option>
 
        <option value=\"Positiv\">".$locale['usi117']."</option>
 
        <option value=\"Kar\">".$locale['usi118']."</option>
 
        <option value=\"Dalig\">".$locale['usi119']."</option>
 
        <option value=\"Seg\">".$locale['usi120']."</option>
 
        <option value=\"Trott\">".$locale['usi121']."</option>
 
       </select>
 
 
 
	<input type='submit' value='".$locale['usi105']."' name='submit' class='button'>
 
<br><br>
 
<img height='30' width='30' src='".BASEDIR."images/mood".$user_mood.".gif'>
 
</center></form>";
 
} else {
 
	echo $locale['usi108'];
 
}
 
closeside();
 
?>

Parašė megar· 2011 Bal. 26 19:04:05
#7

zeck tai man dabar toki ismete

Table 'veiklain_db.DB_USER_STATUS' doesn't existTable 'veiklain_db.DB_USER_STATUS' doesn't exist

kaip tas lenteles sukurti nezinai ?


taip ?

<?php
$result = dbquery("CREATE TABLE ".$db_prefix."DB_USER_STATUS (
user_id SMALLINT(5) UNSIGNED NOT NULL,
stats VARCHAR(200) DEFAULT '' NOT NULL,
mood VARCHAR(10) DEFAULT '' NOT NULL
) TYPE=MyISAM;");

if($result)
echo "<center><p>Lentele sukurta.</p></center>";
else
echo "<center><p>Lentele nesukurta.</p>
<p>".mysql_error()."</p></center>";
?>