View Full Version : little problem
Sleepyk
08-07-2005, 05:31 PM
im not a expert coder very amature seeing i havent coded any hacks or anything in like 2 years but i went to admincp today clicked usergroups and got this error
Parse error: parse error, unexpected $ in /home/content/k/l/e/XXXXX/html/admincp/usergroup.php on line 1363
not sure bout it please help!
vBintense
08-07-2005, 05:34 PM
Open the file that has the error admincp/usergroup.php
Find line 1363 , and check the code or post the code from that line.
Sleepyk
08-07-2005, 05:55 PM
1362 }
1363 foreach($promotions AS $groupid => $promos)
1364 {
its on new 3.0.8 never had this problem before..
Marco van Herwaarden
08-07-2005, 08:02 PM
Please also post the 20 lines before.
You may want to just reupload the origional admincp/usergroup.php file and overwrite the current one.
Sleepyk
08-07-2005, 10:52 PM
this is original
one i got with vb 3.0.8
Sleepyk
08-14-2005, 01:38 AM
ok quite a bit before it but i posted pretty much full section, cuz this hack i need, i need usergroup id's which i need to use this for so without further talkin lol
// ###################### Start modify promotions #######################
if ($_REQUEST['do'] == 'modifypromotion')
{
globalize($_REQUEST, array('usergroupid' => INT));
$title = $DB_site->query_first("SELECT title FROM " . TABLE_PREFIX . "usergroup WHERE usergroupid = $usergroupid");
$promotions = array();
$getpromos = $DB_site->query("
SELECT userpromotion.*, joinusergroup.title
FROM " . TABLE_PREFIX . "userpromotion AS userpromotion
LEFT JOIN " . TABLE_PREFIX . "usergroup AS joinusergroup ON (userpromotion.joinusergroupid = joinusergroup.usergroupid)
" . iif($usergroupid, "WHERE userpromotion.usergroupid = $usergroupid") . "
");
while ($promotion = $DB_site->fetch_array($getpromos))
{
$promotions["$promotion[usergroupid]"][] = $promotion;
}
unset($promotion);
$DB_site->free_result($getpromos);
print_form_header('usergroup', 'updatepromotion');
if (isset($usergroupcache["$usergroupid"]))
{
construct_hidden_code('usergroupid', $usergroupid);
}
foreach($promotions AS $groupid => $promos)
{
print_table_header("$vbphrase[promotions]: <span style=\"font-weight:normal\">{$usergroupcache[$groupid][title]} " . construct_link_code($vbphrase['add_new_promotion'], "usergroup.php?$session[sessionurl]do=updatepromotion&usergroupid=$groupid") . "</span>", 7);
print_cells_row(array(
$vbphrase['usergroup'],
$vbphrase['promotion_type'],
$vbphrase['promotion_strategy'],
$vbphrase['reputation_level'],
$vbphrase['days_registered'],
$vbphrase['posts'],
$vbphrase['controls']
), 1);
---->1363 foreach($promos AS $promotion)
{
Hope i get help by mornin
anyone?
help :)
Marco van Herwaarden
08-15-2005, 10:21 AM
Sorry but i don't see any error in this part of the code. I suggest, you try again with a fresh copy, and then redo the changes.
Sleepyk
08-15-2005, 10:05 PM
^did that now it works
thats odd...
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.