PHP-Fusion Mods
Navigacija
Apsauga
Apsauga Neleista registracija: 28590
Šiandien: 13
Prisijungę nariai
» Svečių: 16
» Narių: 0

» Viso narių: 10,232
» Naujausias: EdvinasG1337

Prisijungimų istorija:
EdvinasG1337senokai
tabuxnepamenu
rolandas94nepamenu
Zbigniew@nepamenu
Edis2nepamenu
klubogerbejasnepamenu
Miskinisnepamenu
mast3rnepamenu
N1nt3ndnepamenu
Matze1987nepamenu
Piter_NSnepamenu
MariukasRnepamenu
Pask. modai
Prisijungti
Vardas

Slaptažodis



Dar ne narys?
Registruotis.

Pamiršai slaptažodį?
Prašyk naujo!.

Naujausi prašymai
[L] testas
Narių apklausa
Ar dar kuriate tinklalapius?

Ne
Ne
0% [0 Balsai]

Taip
Taip
88% [7 Balsai]

Naudojuosi socialiniais tinklais
Naudojuosi socialiniais tinklais
13% [1 Balsas]

Balsai: 8
Kad galėtum balsuoti, turi prisijungti.
Pradėta: 2022-05-29 19:54
Shoutbox
You must login to post a message.

2024-03-07 22:13
Oj Tabux… apkabinčiau už tą moderatorių 😁

2024-02-22 17:40
Šypsosi2 jo buvo laikai.. Senukai jau mes. Bega laikas greiciau nei noretusi. Smagu matyti kad uzsuka seni nariai, ne as vienas Šypsosi

2024-02-20 22:18
Zodziu.. Nostalgija. Sorry Tabux uz spam’a, netelpa viskas i viena shout’a. 😁

2024-02-20 22:14
Aisku dabar tokie laikai, kai turinio valdymo sistemas valdome one-click principu. Ne kaip seniau kode ieskodavom klaidu, norint moda pasileist.. :D paciam reikdavo susidiegt viska i ftp..

2024-02-20 22:03
Sveiki kolegos 👌 kazkada rasiau greit 11 metu bet ziuriu greit 14 metu. 😄 baisuu, reik ta proga kazka sugalvot su php-f kaip jaunima itraukt.

Shoutbox Archive
Peržiūrėti temą
PHP-Fusion Mods :: PHP-Fusion modifikacijų forumas :: Taisymas
 Spausdinti temą
v7 Nerandu klaidos
Wyciokazz
#1 Spausdinti pranešimą
parašyta 2012-07-11 14:40
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

Ieskau jau kelias dienas vis nerandu klaidos:

Klaidos:

Undefined index: laida Eilut�: 87
Undefined index: vedejas Eilut�: 90


Download source  Parser note: Code too big for GeSHi! Using code tag instead:
require_once \"../../maincore.php\";
require_once THEMES.\"templates/admin_header.php\";

if (file_exists(INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\"))
   {
   include INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\";
   }
   else
   {
   include INFUSIONS.\"komanda/locale/Lithuanian.php\";
   }


function showmessage($message){
opentable(\"Informacija\");
echo \"
\".$message.\"
\";
closetable();
}

$error = \"\";

if (!checkrights(\"KOM\") || !defined(\"iAUTH\") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect(\"../index.php\"); }
   
   $editlist = \"\"; $sel = \"\";
   $result2 = dbquery(\"SELECT * FROM \".$db_prefix.\"komanda_cats ORDER BY cat_name\");
   if (dbrows($result2) != 0) {
      while ($data2 = dbarray($result2)) {
         $editlist .= \"\n\";
      }
   }
   $userlist = \"\"; $useriai = \"\";
   $result3 = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_name\");
   if (dbrows($result3) != 0) {
      while ($data3 = dbarray($result3)) {
         $userlist .= \"\n\";
      }
   }

if(isset($_POST['do']) && $_POST['do'] == \"doadd\"){

if(!$_POST['slapyvardis']){
showmessage($locale['a21']);
$error = 1;
}else if(!$_POST['amzius']){
showmessage($locale['a22']);   
$error = 1;
}else if(!$_POST['miestas']){
showmessage($locale['a23']);   
$error = 1;
} else if(!$_POST['pareigos']){
showmessage($locale['a24']);   
$error = 1;
}

if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*10000) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
$slapyvardis = $_POST['slapyvardis'];
$amzius = $_POST['amzius'];
$miestas = $_POST['miestas'];
$pareigos = $_POST['pareigos'];
$kontaktai = $_POST['kontaktai'];
$laida = $_POST['laida'];
$cat_id = $_POST['catid'];
$user_id = $_POST['userid'];
$vedejas = $_POST['vedejas'];
$nuotrauka = $set_avatar;
$result = dbquery(\"INSERT INTO \".$db_prefix.\"komanda (slapyvardis, amzius, miestas, pareigos, kontaktai, laida, cat_id, user_id, nuotrauka, vedejas) VALUES ('\".$slapyvardis.\"', '\".$amzius.\"', '\".$miestas.\"', '\".$pareigos.\"', '\".$kontaktai.\"', '\".$laida.\"', '\".$cat_id.\"', '\".$user_id.\"', '\".$nuotrauka.\"', '\".$vedejas.\"')\");
showmessage($locale['a31']);
}
}
}

if(isset($_POST['do']) && $_POST['do'] == \"del\"){
$img = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$qery = dbquery(\"DELETE FROM \".$db_prefix.\"komanda WHERE id = \".$_POST['id'].\"\");
unlink(IMAGES.\"komanda/\".$img['nuotrauka']);
showmessage($locale['a32']);   
}

if(isset($_POST['do']) && $_POST['do'] == \"edit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$sel = ($komandosas['cat_id'] == $data2['cat_id'] ? \" selected\" : \"\");
$useriai = ($komandosas['user_id'] == $data3['user_id'] ? \" selected\" : \"\");
if(!$komandosas){
showmessage($locale['a26']);
}else{
opentable($locale['a13']);
echo '




 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a11'].'
'.$locale['a12'].'
'.$locale['a11'].'

';
closetable();
}
}

if(isset($_POST['do']) && $_POST['do'] == \"doedit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));

if(!$_POST['id'] or !$_POST['slapyvardis']){
showmessage($locale['a26']);
}else if($_FILES[\"nuotrauka\"][\"error\"] > 0){
$result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"' WHERE id='\".$_POST['id'].\"'\");
showmessage($locale['a33']);   
}else{
if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*$goldsettings['maxbanner120x120size']) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

}   


if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
   $result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"', nuotrauka='\".$set_avatar.\"' WHERE id='\".$_POST['id'].\"'\");
   unlink(IMAGES.\"komanda/\".$komandosas['nuotrauka']);   
showmessage($locale['a31']);
}



}


}

opentable($locale['a14']);
echo '



 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a07'].'
'.$locale['a12'].'
'.$locale['a11'].'

   


 



';

closetable();


opentable($locale['k00']);
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\") > 0){
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=1\") > 0) {
$kad = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '1'\");

while($kads = dbarray($kad)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kads['slapyvardis'].'
';
         echo ($kads['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kads['amzius'].\"
\");
         echo ($kads['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kads['miestas'].\"
\");
         echo ($kads['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kads['laida'].\"
\");
         echo $locale['k04'].' '.$kads['pareigos'].'
';
         echo $locale['k05'].' '.$kads['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a35'].\"
\";
}

if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=2\") > 0) {
$kdj = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '2'\");
while($kdjs = dbarray($kdj)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kdjs['slapyvardis'].'
';
         echo ($kdjs['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kdjs['amzius'].\"
\");
         echo ($kdjs['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kdjs['miestas'].\"
\");
         echo ($kdjs['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kdjs['laida'].\"
\");
         echo $locale['k04'].' '.$kdjs['pareigos'].'
';
         echo $locale['k05'].' '.$kdjs['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a36'].\"
\";
}
}else{
echo \"
\".$locale['a34'].\"
\";
}
closetable();

require_once THEMES.\"templates/footer.php\";
?>



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]
 
PM
MariukasR
#2 Spausdinti pranešimą
parašyta 2012-07-11 22:36
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

Na vien� kart tau pad�siu :) Atyd?iau kod� ra?yk :D

Download source  Code
require_once \"../../maincore.php\";
require_once THEMES.\"templates/admin_header.php\";

if (file_exists(INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\"))
   {
   include INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\";
   }
   else
   {
   include INFUSIONS.\"komanda/locale/Lithuanian.php\";
   }


function showmessage($message){
opentable(\"Informacija\");
echo \"
\".$message.\"
\";
closetable();
}

$error = \"\";

if (!checkrights(\"KOM\") || !defined(\"iAUTH\") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect(\"../index.php\"); }
   
   $editlist = \"\"; $sel = \"\";
   $result2 = dbquery(\"SELECT * FROM \".$db_prefix.\"komanda_cats ORDER BY cat_name\");
   if (dbrows($result2) != 0) {
      while ($data2 = dbarray($result2)) {
         $editlist .= \"\n\";
      }
   }
   $userlist = \"\"; $useriai = \"\";
   $result3 = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_name\");
   if (dbrows($result3) != 0) {
      while ($data3 = dbarray($result3)) {
         $userlist .= \"\n\";
      }
   }

if(isset($_POST['do']) && $_POST['do'] == \"doadd\"){

if(!$_POST['slapyvardis']){
showmessage($locale['a21']);
$error = 1;
}else if(!$_POST['amzius']){
showmessage($locale['a22']);   
$error = 1;
}else if(!$_POST['miestas']){
showmessage($locale['a23']);   
$error = 1;
} else if(!$_POST['pareigos']){
showmessage($locale['a24']);   
$error = 1;
}

if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*10000) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
$slapyvardis = $_POST['slapyvardis'];
$amzius = $_POST['amzius'];
$miestas = $_POST['miestas'];
$pareigos = $_POST['pareigos'];
$kontaktai = $_POST['kontaktai'];
$laida = $_POST['laida'];
$cat_id = $_POST['catid'];
$user_id = $_POST['userid'];
$vedejas = $_POST['vedejas'];
$nuotrauka = $set_avatar;
$result = dbquery(\"INSERT INTO \".$db_prefix.\"komanda (slapyvardis, amzius, miestas, pareigos, kontaktai, laida, cat_id, user_id, nuotrauka, vedejas) VALUES ('\".$slapyvardis.\"', '\".$amzius.\"', '\".$miestas.\"', '\".$pareigos.\"', '\".$kontaktai.\"', '\".$laida.\"', '\".$cat_id.\"', '\".$user_id.\"', '\".$nuotrauka.\"', '\".$vedejas.\"')\");
showmessage($locale['a31']);
}
}
}

if(isset($_POST['do']) && $_POST['do'] == \"del\"){
$img = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$qery = dbquery(\"DELETE FROM \".$db_prefix.\"komanda WHERE id = \".$_POST['id'].\"\");
unlink(IMAGES.\"komanda/\".$img['nuotrauka']);
showmessage($locale['a32']);   
}

if(isset($_POST['do']) && $_POST['do'] == \"edit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$sel = ($komandosas['cat_id'] == $data2['cat_id'] ? \" selected\" : \"\");
$useriai = ($komandosas['user_id'] == $data3['user_id'] ? \" selected\" : \"\");
if(!$komandosas){
showmessage($locale['a26']);
}else{
opentable($locale['a13']);
echo '




 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a11'].'
'.$locale['a12'].'
'.$locale['a11'].'

';
closetable();
}
}

if(isset($_POST['do']) && $_POST['do'] == \"doedit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));

if(!$_POST['id'] or !$_POST['slapyvardis']){
showmessage($locale['a26']);
}else if($_FILES[\"nuotrauka\"][\"error\"] > 0){
$result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"' WHERE id='\".$_POST['id'].\"'\");
showmessage($locale['a33']);   
}else{
if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*$goldsettings['maxbanner120x120size']) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

}   


if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
   $result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"', nuotrauka='\".$set_avatar.\"' WHERE id='\".$_POST['id'].\"'\");
   unlink(IMAGES.\"komanda/\".$komandosas['nuotrauka']);   
showmessage($locale['a31']);
}



}


}

opentable($locale['a14']);
echo '



 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a07'].'
'.$locale['a12'].'
'.$locale['a11'].'

   


 



';

closetable();


opentable($locale['k00']);
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\") > 0){
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=1\") > 0) {
$kad = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '1'\");

while($kads = dbarray($kad)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kads['slapyvardis'].'
';
         echo ($kads['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kads['amzius'].\"
\");
         echo ($kads['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kads['miestas'].\"
\");
         echo ($kads['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kads['laida'].\"
\");
         echo $locale['k04'].' '.$kads['pareigos'].'
';
         echo $locale['k05'].' '.$kads['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a35'].\"
\";
}

if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=2\") > 0) {
$kdj = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '2'\");
while($kdjs = dbarray($kdj)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kdjs['slapyvardis'].'
';
         echo ($kdjs['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kdjs['amzius'].\"
\");
         echo ($kdjs['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kdjs['miestas'].\"
\");
         echo ($kdjs['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kdjs['laida'].\"
\");
         echo $locale['k04'].' '.$kdjs['pareigos'].'
';
         echo $locale['k05'].' '.$kdjs['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a36'].\"
\";
}
}else{
echo \"
\".$locale['a34'].\"
\";
}
closetable();

require_once THEMES.\"templates/footer.php\";
?>




moderator
 
PM
Wyciokazz
#3 Spausdinti pranešimą
parašyta 2012-07-11 23:11
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

kad visvien tas pats erroras naudok php 5.3 gal todel ir nera pas tave erroro
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]
 
PM
MariukasR
#4 Spausdinti pranešimą
parašyta 2012-07-12 00:02
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

Tuoj per?iur�siu kod� v�l.

EDIT: dabar gerai bus :)

Download source  Code
require_once \"../../maincore.php\";
require_once THEMES.\"templates/admin_header.php\";

if (file_exists(INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\"))
   {
   include INFUSIONS.\"komanda/locale/\".$settings['locale'].\".php\";
   }
   else
   {
   include INFUSIONS.\"komanda/locale/Lithuanian.php\";
   }


function showmessage($message){
opentable(\"Informacija\");
echo \"
\".$message.\"
\";
closetable();
}

$error = \"\";

if (!checkrights(\"KOM\") || !defined(\"iAUTH\") || !isset($_GET['aid']) || $_GET['aid'] != iAUTH) { redirect(\"../index.php\"); }
   
   $editlist = \"\"; $sel = \"\";
   $result2 = dbquery(\"SELECT * FROM \".$db_prefix.\"komanda_cats ORDER BY cat_name\");
   if (dbrows($result2) != 0) {
      while ($data2 = dbarray($result2)) {
         $editlist .= \"\n\";
      }
   }
   $userlist = \"\"; $useriai = \"\";
   $result3 = dbquery(\"SELECT * FROM \".$db_prefix.\"users ORDER BY user_name\");
   if (dbrows($result3) != 0) {
      while ($data3 = dbarray($result3)) {
         $userlist .= \"\n\";
      }
   }

if(isset($_POST['do']) && $_POST['do'] == \"doadd\"){

if(!$_POST['slapyvardis']){
showmessage($locale['a21']);
$error = 1;
}else if(!$_POST['amzius']){
showmessage($locale['a22']);   
$error = 1;
}else if(!$_POST['miestas']){
showmessage($locale['a23']);   
$error = 1;
} else if(!$_POST['pareigos']){
showmessage($locale['a24']);   
$error = 1;
}

if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*10000) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
$slapyvardis = $_POST['slapyvardis'];
$amzius = $_POST['amzius'];
$miestas = $_POST['miestas'];
$pareigos = $_POST['pareigos'];
$kontaktai = $_POST['kontaktai'];
$laida = $_POST['laida'];
$cat_id = $_POST['catid'];
$user_id = $_POST['userid'];
$vedejas = $_POST['vedejas'];
$nuotrauka = $set_avatar;
$result = dbquery(\"INSERT INTO \".$db_prefix.\"komanda (slapyvardis, amzius, miestas, pareigos, kontaktai, laida, cat_id, user_id, nuotrauka, vedejas) VALUES ('\".$slapyvardis.\"', '\".$amzius.\"', '\".$miestas.\"', '\".$pareigos.\"', '\".$kontaktai.\"', '\".$laida.\"', '\".$cat_id.\"', '\".$user_id.\"', '\".$nuotrauka.\"', '\".$vedejas.\"')\");
showmessage($locale['a31']);
}
}
}

if(isset($_POST['do']) && $_POST['do'] == \"del\"){
$img = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$qery = dbquery(\"DELETE FROM \".$db_prefix.\"komanda WHERE id = \".$_POST['id'].\"\");
unlink(IMAGES.\"komanda/\".$img['nuotrauka']);
showmessage($locale['a32']);   
}

if(isset($_POST['do']) && $_POST['do'] == \"edit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));
$sel = ($komandosas['cat_id'] == $data2['cat_id'] ? \" selected\" : \"\");
$useriai = ($komandosas['user_id'] == $data3['user_id'] ? \" selected\" : \"\");
if(!$komandosas){
showmessage($locale['a26']);
}else{
opentable($locale['a13']);
echo '




 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a11'].'
'.$locale['a12'].'
'.$locale['a11'].'

';
closetable();
}
}

if(isset($_POST['do']) && $_POST['do'] == \"doedit\"){
$komandosas = dbarray(dbquery(\"SELECT * FROM \".$db_prefix.\"komanda WHERE id = '\".$_POST['id'].\"'\"));

if(!$_POST['id'] or !$_POST['slapyvardis']){
showmessage($locale['a26']);
}else if($_FILES[\"nuotrauka\"][\"error\"] > 0){
$result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"' WHERE id='\".$_POST['id'].\"'\");
showmessage($locale['a33']);   
}else{
if ($error == \"\") {
   $sndyra = mktime(date(\"H\"),date(\"i\"),date(\"s\"),date(\"m\"),date(\"d\"),date(\"Y\"));
   $newavatar = $_FILES['nuotrauka'];
   if (!empty($newavatar['name']) && is_uploaded_file($newavatar['tmp_name'])) {
      $avatarext = strrchr($newavatar['name'],\".\");
      $avatarname = substr($newavatar['name'], 0, strrpos($newavatar['name'], \".\"));
      if (preg_match(\"/^[-0-9A-Z_\[\]]+$/i\", $avatarname) && preg_match(\"/(\.gif|\.GIF|\.jpg|\.JPG|\.png|\.PNG)$/\", $avatarext) && $newavatar['size'] <= 1024*$goldsettings['maxbanner120x120size']) {
         $avatarname = $avatarname.\"[\".$userdata['user_id'].$sndyra.\"]\".$avatarext;
         $set_avatar = $avatarname;
         move_uploaded_file($newavatar['tmp_name'], IMAGES.\"komanda/\".$avatarname);
         chmod(IMAGES.\"komanda/\".$avatarname,0644);
         if ($size = @getimagesize(IMAGES.\"komanda/\".$avatarname)) {
            if ($size['0'] > 120 || $size['1'] > 120) {
               unlink(IMAGES.\"komanda/\".$avatarname);
               $set_avatar = \"\";
            }
         } else {
            unlink(IMAGES.\"komanda/\".$avatarname);
            $set_avatar = \"\";
         }
      }
   }

}   


if($set_avatar == \"\"){
showmessage($locale['a25']);
}else{
   $result = dbquery(\"UPDATE \".$db_prefix.\"komanda SET slapyvardis='\".$slapyvardis.\"', amzius='\".$amzius.\"', miestas='\".$miestas.\"', pareigos='\".$pareigos.\"', kontaktai='\".$kontaktai.\"', laida='\".$laida.\"', cat_id='\".$cat_id.\"', user_id='\".$user_id.\"', vedejas='\".$vedejas.\"', nuotrauka='\".$set_avatar.\"' WHERE id='\".$_POST['id'].\"'\");
   unlink(IMAGES.\"komanda/\".$komandosas['nuotrauka']);   
showmessage($locale['a31']);
}



}


}

opentable($locale['a14']);
echo '



 
   
   
 
 
   
   
 
   
   
   
 
   
   
   
 
   
   
   
 
 
   
   
 
 
   
   
 
 
   
   
 
 
   
   
     
 
   
   
 
 
   
 
'.$locale['a01'].'
'.$locale['a02'].'
'.$locale['a03'].'
'.$locale['a04'].'
'.$locale['a05'].'
'.$locale['a06'].'
'.$locale['a17'].'
'.$locale['a07'].'
'.$locale['a12'].'
'.$locale['a11'].'

   


 



';

closetable();


opentable($locale['k00']);
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\") > 0){
if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=1\") > 0) {
$kad = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '1'\");

while($kads = dbarray($kad)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kads['slapyvardis'].'
';
         echo ($kads['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kads['amzius'].\"
\");
         echo ($kads['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kads['miestas'].\"
\");
         echo ($kads['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kads['laida'].\"
\");
         echo $locale['k04'].' '.$kads['pareigos'].'
';
         echo $locale['k05'].' '.$kads['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a35'].\"
\";
}

if(dbcount(\"(*)\", DB_PREFIX.\"komanda\", \"cat_id=2\") > 0) {
$kdj = dbquery(\"SELECT * from \".DB_PREFIX.\"komanda WHERE cat_id = '2'\");
while($kdjs = dbarray($kdj)) {
echo '

 
   
 
 
   
 
 
   
   
 
 

Administracija

';
         
         echo '
         
         
         ';
         
         echo '
';
         
         echo $locale['k01'].' '.$kdjs['slapyvardis'].'
';
         echo ($kdjs['amzius'] == \"\" ? \"\" : \"\".$locale['k02'].\" \".$kdjs['amzius'].\"
\");
         echo ($kdjs['miestas'] == \"\" ? \"\" : \"\".$locale['k03'].\" \".$kdjs['miestas'].\"
\");
         echo ($kdjs['laida'] == \"\" ? \"\" : \"\".$locale['k06'].\" \".$kdjs['laida'].\"
\");
         echo $locale['k04'].' '.$kdjs['pareigos'].'
';
         echo $locale['k05'].' '.$kdjs['kontaktai'].'
';
         echo '

';
}
} else {
echo \"
\".$locale['a36'].\"
\";
}
}else{
echo \"
\".$locale['a34'].\"
\";
}
closetable();

require_once THEMES.\"templates/footer.php\";
?>



Redagavo MariukasR 2012-07-12 00:06
moderator
 
PM
Wyciokazz
#5 Spausdinti pranešimą
parašyta 2012-07-12 11:21
Vartotojo avataras

Administratorius



Reputacija: 1

Pranešimai: 2108
Įstojo: 2008-02-27

Didelis tau d�kui :)
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]
 
PM
MariukasR
#6 Spausdinti pranešimą
parašyta 2012-07-12 20:26
Vartotojo avataras

Moderatorius



Reputacija: 0

Pranešimai: 435
Įstojo: 2010-11-12

N�ra u? k�, mums padedi tai ir tau reikia pad�t ;D
moderator
 
PM
Peršokti į forumą: