v7 Modulis sveciams
|
wasL |
parašyta 2012-08-12 11:00
|
Naujokas

Reputacija:
0
Pranešimai: 1
Įstojo: 2012-08-01
|
Labas,
Kaip reikia padaryti moduli, kad gal�tu matyti ne tik nariai, bet ir sve�iai?
Kai ateinu kaip svecias tai rodo be jokio turinio.
Redagavo wasL 2012-08-12 11:02 |
|
|
|
Wyciokazz |
parašyta 2012-08-12 12:13
|

Administratorius

Reputacija:
1
Pranešimai: 2108
Įstojo: 2008-02-27
|
ka matyti paaiskink nes siaip nusistato teises kam rodyti jeigu nustatai jog sveciams tada visiems rodo.
Kam kurti tai kas jau sukurta.
Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.
[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img] |
|
|
|
tomukzzz |
parašyta 2012-08-12 15:45
|
Naujokas

Reputacija:
0
Pranešimai: 8
Įstojo: 2010-06-13
|
Code
require_once \"../../maincore.php\";
require_once THEMES.\"templates/header.php\";
if (file_exists(INFUSIONS.\"suggestion_box/locale/\".$settings['locale'].\".php\")) {
include INFUSIONS.\"suggestion_box/locale/\".$settings['locale'].\".php\";
} else {
include INFUSIONS.\"suggestion_box/locale/English.php\";
}
error_reporting(E_ALL ^ E_NOTICE);
if (iMEMBER) {
if (!isset($step)) $step = \"\";
if (isset($_POST['submit_suggestion'])) {
$suggestion_summary = stripinput($_POST['suggestion_summary']);
$suggestion_version = stripinput($_POST['suggestion_version']);
$suggestion_description = stripinput($_POST['suggestion_description']);
if ($suggestion_summary != \"\" && $suggestion_description != \"\") {
$result = dbquery(\"INSERT INTO \".$db_prefix.\"suggestion_box VALUES('', '\".$userdata['user_id'].\"', '$suggestion_summary', '$suggestion_version', '$suggestion_description', '', '\".$locale['err142'].\"', '\".time().\"')\");
}
redirect(FUSION_SELF);
}
if ($step == \"view\") {
include INCLUDES.\"comments_include.php\";
if (!$suggestion_id || !isNum($suggestion_id)) redirect(FUSION_SELF);
opentable($locale['err110']);
$data = dbarray(dbquery(
\"SELECT ter.*, user_id,user_name FROM \".$db_prefix.\"suggestion_box ter
LEFT JOIN \".$db_prefix.\"users tusr ON ter.suggestion_user=tusr.user_id
WHERE suggestion_id='\".$suggestion_id.\"'\"
));
echo \"
\n\";
if ($data['suggestion_response']) {
echo \"
\n\";
}
echo \"
\".$data['suggestion_summary'].\" |
\".$locale['err111'].\" |
\".$data['user_name'].\" -
\".strftime($settings['longdate'], $data['suggestion_datestamp']+($settings['timeoffset']*3600)).\" |
\".$locale['err112'].\" |
\".$data['suggestion_version'].\" |
\".$locale['err113'].\" |
\".nl2br($data['suggestion_description']).\" |
\".$locale['err114'].\" |
\".nl2br($data['suggestion_response']).\" |
\".$locale['err115'].\" |
\".$data['suggestion_status'].\" |
\n\";
closetable();
showcomments(\"E\",\"\".$db_prefix.\"suggestion_box\",\"suggestion_id\",$suggestion_id,FUSION_SELF.\"?step=view&suggestion_id=$suggestion_id\",\"\");
tablebreak();
}
opentable($locale['err120']);
$result = dbquery(
\"SELECT ter.*, user_id,user_name, COUNT(comment_item_id) AS suggestion_comments
FROM \".$db_prefix.\"suggestion_box ter
LEFT JOIN \".$db_prefix.\"users tusr ON ter.suggestion_user=tusr.user_id
LEFT JOIN \".$db_prefix.\"comments ON ter.suggestion_id=comment_item_id AND comment_type='E'
GROUP BY suggestion_id ORDER BY suggestion_datestamp DESC\"
);
if (dbrows($result)) {
$i = 0;
echo \"
\n\";
while ($data = dbarray($result)) {
$i % 2 == 0 ? $tclass=\"tbl1\" : $tclass=\"tbl2\";
echo \"
\n\";
}
echo \"\n\";
} else {
echo \" \n\".$locale['err123'].\"
\n\n\";
}
closetable();
tablebreak();
opentable($locale['err130']);
echo \"\n\";
closetable();
} else {
opentable($locale['err120']);
echo \" \n\".$locale['err124'].\"
\n\n\";
closetable();
}
require_once THEMES.\"templates/footer.php\";
?>
Reikia padaryti jog butu matomas tik sveciam ;]
Redagavo tomukzzz 2012-08-12 15:46 |
|
|
|
Wyciokazz |
parašyta 2012-08-12 17:09
|

Administratorius

Reputacija:
1
Pranešimai: 2108
Įstojo: 2008-02-27
|
kaip sita suprast tik sveciam tipo narys nemato o tik svecias mato?
Kam kurti tai kas jau sukurta.
Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.
[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img] |
|
|
|
minimukas |
parašyta 2012-08-12 20:35
|

Moderatorius

Reputacija:
0
Pranešimai: 602
Įstojo: 2009-06-11
|
Tai susirask:
Codeif (iMEMBER) {
}
trink lauk ir viskas tada visi matys.... |
|
|
|
Wyciokazz |
parašyta 2012-08-13 12:36
|

Administratorius

Reputacija:
1
Pranešimai: 2108
Įstojo: 2008-02-27
|
o jeigu nori jog matytu sveciai bet nenariai keik iMEMBER y iGUEST
Kam kurti tai kas jau sukurta.
Nesu ekstrasensas ar dar koks čigonas tad iš nieko negaliu suprast kur bėda.
[img]http://27.media.tumblr.com/tumblr_m3hdwudgjG1rteofuo1_500.gif[/img] |
|
|