I am trying to turn off a block in drupal using existing code. <?php $node = node_load(arg(1)); $type = $node->type; if(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } else { return in_array($type,array('3_column_interior_page', '3_column_faculty_bio_page')); } ?> I wanted to add a page that will not show the block... <?php $node = node_load(arg(1)); $type = $node->type; if(substr($_SERVER["REQUEST_URI"], 0, 13) == '/our-people') { return TRUE; } // new code here - I don't want this block to show up on the info sessions page. elseif ($_SERVER["REQUEST_URI"], 0, 13) == '/information-sessions' { return FALSE; } // end new code elseif { return in_array($type,array('3_column_interior_page', …

Member Avatar
Member Avatar
+0 forum 5

Hi all, I have a situation where am using String conditions(say if(name.equalsIgnoreCase(Arathy)). I want to replace this if-else loop with Switch cases..What way i can do to accomplish this?

Member Avatar
Member Avatar
+0 forum 2

Hi! I'm making a chess program, that need to move pieces on the chess board, get an input,check if the move is valid and print the output. The compiler finds some errors that i don't understand...I need some help with the pieces functions. Plz help me fix them!!! my attempts : //Chess project// #include <cstdlib> #include <iostream> using namespace std; #include<stdio.h> #include<string.h> #include<stdlib.h> // all figures are represented as a constant integers// //constants // all columns are presented as an integers # int board[8][8];//chess board is presented as a 2D array of int #define empty 0 #define pawn 1 #define …

Member Avatar
Member Avatar
+0 forum 35

I looked around quite a bit on how to solve this but i couldn't find a lot .. can anyone help me? The capitalized variables are constants [CODE] case '4': { bubbleSort(aList); string strKey; cout << " Input: "; cin >> strKey; binarySearch(aList, strKey); int binarySearchResult = binarySearch(aList, strKey); if (binarySearchResult = iERRORNOTFOUND || binarySearchResult = iERROREMPTY)//Error C2106 "=" Left operand must be l-value {} else {} } [/CODE]

Member Avatar
Member Avatar
+0 forum 3

I am converting seconds to minutes, hours, days. For some reason I have an issue with the days not calculating when running the program. The 'if' statement seems completely ignored by the program. I think this may be caused by the warning I get. Any help would be greatly appreciated in explaining the warning and my current issue: Warning: Constant is long in function main() [CODE] #include <iostream.h> //using namespace std; int main() { // Constants for Conversion int seconds, minute, hour; double day; cout << "Enter the number of seconds: "; cin >> seconds; day = seconds / 86400; …

Member Avatar
Member Avatar
+0 forum 18

I've been messing arround with this for the past little while and I can't seem to figure out the best way to to about doing this. Essentially, I'm trying to create a three part statement. The first will check is a session variable isset & the user has a rolecd of 2. If not, it will check to see if the session variable isset. If not, then it displays a login message. Any help would be much appreciated and I'm sorry, I just getting use to the isset construct and I'm not as familiar with it. From what I understand; …

Member Avatar
Member Avatar
+0 forum 1

Hello, I was hoping that someone can help me with this. I have this linking list working, but I have one problem, when I click on the link it shows up with the link like this winner.php?service=1&&year=2010 and honorable.php?service=1&&year=2010&award=1 this is for all years not just 2010, and what I need it to do is show winner.php?service=AM&&year=2010 and honorable.php?service=AM&&year=2010&award=Notables I have looked in my db, and the values are correct, so I know that is not the issue. [CODE]<ul> <?php $row['year']='2010'; while($row['year']>'2000') { ?> <li> <?php if($row['service']='AM' && $row['award']='Winner') { ?> <a href="winner.php?service=<?php print $row['service'];?>&year=<?php echo $row['year'];?>"><?php echo $row['year'];?></a> <?php …

Member Avatar
Member Avatar
+0 forum 3

The End.