Temos pavadinimas: WordPress, Shopify ir PHPFusion programuotojų bendruomenė :: v7 Kodel kaip refreshinu pinigai dauginasi?
Parašė sgsdfgsdgs· 2009 Sau. 30 21:01:30
#1
Sweiki, iskilo tokia problemele kajp refreshinu langa pinigai dauginasi... (USER GOLD V3) Kaip padaryt kad tjp nebutu koda visaip bandziau sioje funkcijoje perkelti bet nk...
if (isset($_POST['submit_article'])) {
if ($_POST['article_subject'] != "" && $_POST['article_body'] != "") {
$submit_info['article_cat'] = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$submit_info['article_subject'] = stripinput($_POST['article_subject']);
$submit_info['article_snippet'] = descript($_POST['article_snippet']);
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
if (USERGOLD && GLD_ARTICLE_SUBMIT)
{
payuser($userdata['user_id'], GLD_ARTICLE_SUBMIT, 'cash');
}
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
Dekui uz pagalba.
Parašė sgsdfgsdgs· 2009 Sau. 31 13:01:31
#2
Nepykit uz dviguba posta... Bet labai reik kad padetumet vos ne kas minute paziuriu ar nieks neatsake... Nors kazka pasakykit kodel taip yra kaj refresh'inu langa man dauginasi pinigai... Jokiam saite neatsako ar ash cia ka durno parasiau ar ka pasakykit gi :(
Parašė ex-it· 2009 Sau. 31 14:01:06
#3
if (USERGOLD && GLD_ARTICLE_SUBMIT
&& $result) negarantuoju bet pamegink.
Parašė sgsdfgsdgs· 2009 Sau. 31 14:01:32
#4
Nepadeda tai bet nesuprantu man ir administracijoj dauginasi jejgu refreshinu... Gal kas zinot kodel tai gali buti? Dekui uz bet kokia pagalba
Parašė ex-it· 2009 Sau. 31 14:01:55
#5
Tai blogai ikises koda esi, todel ir dauginasi.
Parašė sgsdfgsdgs· 2009 Sau. 31 14:01:36
#6
Virsuje sita ikeliu...
if (file_exists(INFUSIONS."user_gold/functions.php"))
{
include_once INFUSIONS."user_gold/functions.php";
}
Ir sioje arkticle skiltyje padarau taip ir visaip kitaip bebandziau:
} elseif ($_GET['stype'] == "a") {
if (isset($_POST['submit_article'])) {
if ($_POST['article_subject'] != "" && $_POST['article_body'] != "") {
$submit_info['article_cat'] = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$submit_info['article_subject'] = stripinput($_POST['article_subject']);
$submit_info['article_snippet'] = descript($_POST['article_snippet']);
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
if (USERGOLD && GLD_ARTICLE_SUBMIT && $result)
{
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
payuser($userdata['user_id'], GLD_ARTICLE_SUBMIT, 'cash');
}
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
Delto ir atejau cia kad padetumete pasakyti ka blogai darau... Dekui ex-it vienas kuris dalyvauji cia :)
Redagavo sgsdfgsdgs· 2009 Sau. 31 14:01:07
Parašė ex-it· 2009 Sau. 31 14:01:04
#7
if (isset($_POST['submit_article'])) {
if ($_POST['article_subject'] != "" && $_POST['article_body'] != "") {
$submit_info['article_cat'] = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$submit_info['article_subject'] = stripinput($_POST['article_subject']);
$submit_info['article_snippet'] = descript($_POST['article_snippet']);
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
if (USERGOLD && GLD_ARTICLE_SUBMIT && $result)
{
payuser($userdata['user_id'], GLD_ARTICLE_SUBMIT, 'cash');
}
Nezinau... :D
Parašė MAnjack· 2009 Sau. 31 15:01:49
#8
Dėk, tikrinimą, kad nebūtų update po refresh arba po $_POST, kad būtų.
Parašė sgsdfgsdgs· 2009 Sau. 31 15:01:27
#9
MAnjack parašė:
Dėk, tikrinimą, kad nebūtų update po refresh arba po $_POST, kad būtų.
Sioje vietoje ta prasme? man vistiek dauginasi..
} elseif ($_GET['stype'] == "a") {
if (isset($_POST['submit_article'])) {
if ($_POST['article_subject'] != "" && $_POST['article_body'] != "") {
$submit_info['article_cat'] = isnum($_POST['article_cat']) ? $_POST['article_cat'] : "0";
$submit_info['article_subject'] = stripinput($_POST['article_subject']);
$submit_info['article_snippet'] = descript($_POST['article_snippet']);
$submit_info['article_body'] = descript($_POST['article_body']);
$submit_info['article_breaks'] = (isset($_POST['line_breaks']) ? "y" : "n");
$result = dbquery("INSERT INTO ".DB_SUBMISSIONS." (submit_type, submit_user, submit_datestamp, submit_criteria) VALUES ('a', '".$userdata['user_id']."', '".time()."', '".addslashes(serialize($submit_info))."')");
add_to_title($locale['global_200'].$locale['500']);
opentable($locale['500']);
echo "<div style='text-align:center'><br />\n".$locale['510']."<br /><br />\n";
if (USERGOLD && GLD_ARTICLE_SUBMIT && $result)
{
payuser($userdata['user_id'], GLD_ARTICLE_SUBMIT, 'cash');
}
echo "<a href='submit.php?stype=a'>".$locale['511']."</a><br /><br />\n";
echo "<a href='index.php'>".$locale['412']."</a><br /><br />\n</div>\n";
closetable();
}
Gal galetum parodyt kajp pavizdi? mazdaug su tuo kodu kur idejau?
Redagavo sgsdfgsdgs· 2009 Sau. 31 15:01:38
Parašė sgsdfgsdgs· 2009 Vas. 1 01:02:41
#10
Viskas daugiau nieks nebepades? :)