function displayWeeks($list, $task, $level, $fromPeriod, $toPeriod) { if ($fromPeriod == -1) { return ""; } $s = new CDate($fromPeriod); $e = new CDate($toPeriod); $sw = getBeginWeek($s); //intval($s->Format("%U")); $ew = getEndWeek($e); //intval($e->Format("%U")); $st = new CDate($task->task_start_date); $et = new CDate($task->task_end_date); $stw = getBeginWeek($st); //intval($st->Format("%U")); $etw = getEndWeek($et); //intval($et->Format("%U")); //print "week from: $stw, to: $etw<br>\n"; $row = ""; for ($i = $sw; $i <= $ew; $i++) { if ($i >= $stw and $i < $etw) { $color = "blue"; if ($level == 0 and hasChildren($list, $task)) { $color = "#C0C0FF"; } else { if ($level == 1 and hasChildren($list, $task)) { $color = "#9090FF"; } } $row .= "<td nowrap=\"nowrap\" bgcolor=\"{$color}\">"; } else { $row .= "<td nowrap=\"nowrap\">"; } $row .= "  </td>"; } return $row; }
function displayWeeks_r($list, $task, $level, $fromPeriod, $toPeriod, $user_id = 0) { if ($fromPeriod == -1) { return ''; } $s = new w2p_Utilities_Date($fromPeriod); $e = new w2p_Utilities_Date($toPeriod); $sw = getBeginWeek($s); $ew = getEndWeek($e); $st = new w2p_Utilities_Date($task->task_start_date); $et = new w2p_Utilities_Date($task->task_end_date); $stw = getBeginWeek($st); $etw = getEndWeek($et); $row = ''; for ($i = $sw; $i <= $ew; $i++) { $assignment = ''; if ($i >= $stw and $i < $etw) { $color = '#0000FF'; if ($level == 0 and hasChildren($list, $task)) { $color = '#C0C0FF'; } elseif ($level == 1 and hasChildren($list, $task)) { $color = '#9090FF'; } if ($user_id) { $users = $task->getAssignedUsers($task->task_id); $assignment = $users[$user_id]['perc_assignment'] ? $users[$user_id]['perc_assignment'] . '%' : ''; } } else { $color = '#FFFFFF'; } $row .= '<td bgcolor="' . $color . '" class="center">'; $row .= '<font color="' . bestColor($color) . '">'; $row .= $assignment; $row .= '</font>'; $row .= '</td>'; } return $row; }
if (logActivity()) { $sql = "Insert into sptbl_actionlog(nALId,nStaffId,vAction,vArea,nRespId,dDate) Values('','{$var_staffid}','" . TEXT_ADDITION . "','Categories','" . mysql_real_escape_string($var_insert_id) . "',now())"; executeQuery($sql, $conn); } $var_catname = ""; $message = true; $infomessage = MESSAGE_RECORD_ADDED_SUCCESSFULLY; $flag_msg = 'class="msg_success"'; } } elseif ($_POST["postback"] == "D") { $catid = $var_id; if (hasEntries($catid)) { $error = true; $errormessage .= MESSAGE_HAS_ENTRIES . "<br>"; } if (hasChildren($catid)) { $error = true; $errormessage .= MESSAGE_HAS_CHILDREN . "<br>"; } if (!$error) { $sql = "delete from sptbl_categories where nCatId='" . mysql_real_escape_string($var_id) . "'"; executeQuery($sql, $conn); //Insert the actionlog if (logActivity()) { $sql = "Insert into sptbl_actionlog(nALId,nStaffId,vAction,vArea,nRespId,dDate) Values('','{$var_staffid}','" . TEXT_DELETION . "','Categories','" . mysql_real_escape_string($var_id) . "',now())"; executeQuery($sql, $conn); } $var_catname = ""; $var_catid = ""; $var_id = ""; $var_companyid = trim($_POST["cmbCompany"]);
function displayWeeks($list, $task, $level, $fromPeriod, $toPeriod) { if ($fromPeriod == -1) { return ''; } $s = new CDate($fromPeriod); $e = new CDate($toPeriod); $sw = getBeginWeek($s); //intval($s->Format('%U')); $ew = getEndWeek($e); //intval($e->Format('%U')); $st = new CDate($task->task_start_date); $et = new CDate($task->task_end_date); $stw = getBeginWeek($st); //intval($st->Format('%U')); $etw = getEndWeek($et); //intval($et->Format('%U')); //print "week from: $stw, to: $etw<br>\n"; $row = ''; for ($i = $sw; $i <= $ew; $i++) { if ($i >= $stw and $i < $etw) { $color = 'blue'; if ($level == 0 and hasChildren($list, $task)) { $color = '#C0C0FF'; } else { if ($level == 1 and hasChildren($list, $task)) { $color = '#9090FF'; } } $row .= '<td nowrap="nowrap" bgcolor="' . $color . '">'; } else { $row .= '<td nowrap="nowrap">'; } $row .= '  </td>'; } return $row; }
/** * Parses the style tags of the given xml element and uses them to generate * the associated html code. * @param SimpleXMLElement $xmlElement * @param boolean $shouldAddSwapToLinks * @param string $cssMenuClassName * * @return string * @author Andrew Darwin <*****@*****.**> */ function getElementContentWithStyleTags($xmlElement, $shouldAddSwapToLinks, $cssMenuClassName) { $header = "getElementContentWithStyleTags(): "; logMessage("{$header} Beginning call...\n" . "xmlElement = '" . getTrimmed($xmlElement) . "'\n" . "shouldAddSwapToLinks = some boolean\n" . "cssMenuClassName = '{$cssMenuClassName}'"); $attributes = $xmlElement->attributes(); logMessage("{$header} Obtained attributes from XML Element, '{$xmlElement}'"); $output = ""; $prefix = ""; $suffix = ""; $urlSpecified = false; $urlOpenTag = ""; $urlCloseTag = ""; $outputHTMLAttributes = ""; if ($attributes != null) { foreach ($attributes as $attribute) { $currentAttributeName = $attribute->getName(); switch ($currentAttributeName) { case "style": $styles = formatStyleAttribute($attribute); foreach ($styles as $style) { addToPrefix($prefix, "<{$style}>"); addToSuffix($suffix, "</{$style}>"); } break; case "css": $outputHTMLAttributes = "class=\"{$attribute}\""; break; case "url": // Must apply url last, so lets save it to a variable and do // stuff with it later $urlSpecified = true; $loadURLPrefix = ""; if (strpos(getcwd(), "resources/scripts") == false) { $loadURLPrefix = "resources/scripts/"; } // Escape any necessary characters from the url $attribute = clean_url($attribute); logMessage("{$header} Clean url = '{$attribute}'"); $target = getAttributeValue($xmlElement, "target"); $isExternal = is_link_external($attribute); $loadURLPrefix .= "loadURL.php"; $extension = pathinfo($attribute, PATHINFO_EXTENSION); if ($extension == "xml") { $href = "'{$loadURLPrefix}?url={$attribute}'"; } else { $href = "'{$attribute}'"; } if ($target == "new_tab" || $target != "same_tab" && is_link_external($attribute)) { $href .= " target='_blank'"; $shouldAddSwapToLinks = false; } $urlOpenTag = "<a href={$href}"; if ($shouldAddSwapToLinks) { $urlOpenTag .= " target='innerframe'"; } if ($cssMenuClassName != "") { $urlOpenTag .= " class='{$cssMenuClassName}'"; } $urlOpenTag .= ">"; $urlCloseTag = "</a>"; } } if ($urlSpecified) { addToPrefix($prefix, $urlOpenTag); addToSuffix($suffix, $urlCloseTag); } } else { logMessage("{$header} The XML Element, '{$xmlElement}' had no attributes. " . "Continue without applying any attributes or styles."); } $innerContent = getTrimmed($xmlElement); if (hasChildren($xmlElement)) { $children = $xmlElement->children(); $child = $children[0]; if ($child->getName() == "link") { logMessage("{$header} Determined that XML Element, '" . getTrimmed($xmlElement) . "' has link children. Set " . "inner content to [recursive call]..."); $innerContent = parseLink($xmlElement); logMessage("{$header} InnerContent is now '{$innerContent}' after " . "calling parseLink"); } else { logMessage("{$header} Determined xml element, '" . getTrimmed($xmlElement) . "' has children, but not LINK children"); } } else { logMessage("{$header} Determined that XML Element, '" . getTrimmed($xmlElement) . "' does not have any link " . "children. Set inner content to '" . getTrimmed($xmlElement) . "'"); } $output = $prefix . $innerContent . $suffix; logMessage("{$header} Return '{$output}'"); return $output; }
<div class="dbline"></br></div> <h1><?php echo $parent->title; ?></h1> <div class="dbline"></br></div> <div style="display: block; height: 20px;"></div> <div class="text"> <?php foreach($menuItems as $item) { $id=$item->menu_item_parent; if ($id!=$parentId) continue; $title = $item->title; $url = $item->url; if ( ($url=='') || ($url=='#')) if (hasChildren($menuItems, $item->ID)) $url="?bread=".$item->ID; echo "<a href='$url'>$title</a>"; echo '</br>'; } echo '<div style="clear:both; display:block; height:48px;"></div>'; ?> </div> <?php get_footer(); ?>
?> <li class="racine"><a href="cours.php"><img alt="racine" src="themes/original/images/repertoire.png" /> racine</a></li> <?php $nb_elements = count(getBreadcrumb($repertoire_courant)); if ($nb_elements > 0) { ?> <li><img alt=">" src="themes/original/images/arrow.gif" /></li> <?php } ?> <?php } else { echo "<li><a href=\"cours.php?p=", rawurlencode($p), "&orderby=nom&order=" . $order . "\">", normalizeString($element), "</a></li>"; // s'il n'y a pas d'elements enfants, on n'affiche pas le marqueur if (hasChildren($p)) { ?> <li><img alt=">" src="./themes/original/images/arrow.gif" /></li> <?php } } } ?> </ul> </div><!-- fin contenu --> </nav> <div class="container"> <div class="col-sm-3">