public function renderDetail($view, $title, $action, $form_action, $buttons) { $contr = get_session('contr'); $html = ''; $html .= NL . '<link type="text/css" rel="stylesheet" href="/css/' . $contr . '_detail.css?20101025" />'; // $html .= NL . ' <div class="clear"></div>'; $style = $action == 'index' ? ' style="display:none"' : ''; if ($action != 'index') { $html .= NL . ' <!-- Content header -->'; $html .= NL . ' <div id="cont_header" class="padding">'; $html .= NL . ' <div class="float_left">'; $html .= NL . ' <span class="black">' . $title . '</span>'; $html .= NL . ' </div>'; if ($action == 'show') { $html .= NL . ' <div id="cont_controls">'; $html .= NL . ' <a href=' . $view->previous . ' ><< Previous</a> | '; $html .= NL . ' <a href=' . $view->next . ' >Next >></a>'; $html .= NL . ' </div id="cont_controls">'; } $html .= NL . ' <div class="clear"></div>'; $html .= NL . ' </div id="cont_header">'; } $html .= NL . ' <div id="content_body">'; $html .= NL . ' <!-- Content details -->'; $html .= NL . ' <div id="content_details">'; $html .= NL . ' <form id="im_form" action="/' . $contr . "/" . $form_action . '" method="post" enctype="multipart/form-data"' . $style . '>'; $html .= NL . $view->render($contr . '/detail.phtml'); $html .= NL . ' <!-- Save Changes -->'; $html .= NL . ' <div id="save_changes" class="bg_gray">'; $my_buttons = explode(',', $buttons); foreach ($my_buttons as $my_button) { $html .= NL . ' <a class="all_buttons button_details" onclick="javascript:submit_form_name( \'im_form\', \'' . $my_button . '\' )"><span>' . $my_button . '</span></a>'; } if ($action != 'index') { $html .= NL . ' <div class="or_anchor_enabled">or <a class="enabled_link" onclick="javascript:submit_form_name( \'im_form\', \'Cancel\' )">Cancel</a></div>'; } $html .= NL . ' </div>'; $html .= NL . '<div>' . put_img('round_corner_gray_bottom.jpg') . '</div>'; $html .= NL . '</form id="im_form">'; $html .= NL . '</div id="content_details">'; $html .= NL . '</div id="content_body">'; return $html; }
function put_status_new($status) { if ($status == 'A') { $html = put_img('green_circle.png', 'width="20", height="20", alt=""'); } else { if ($status == 'I') { $html = put_img('red_circle.png', 'width="20", height="20", alt=""'); } else { if ($status == 'X') { $html = put_img('red_circle.png', 'width="20", height="20", alt=""'); } else { if ($status == 'Q' || $status == 'E') { $html = put_img('clock.png', 'width="20", height="20", alt=""'); } else { if ($status == 'N') { $html = put_img('red_circle.png', 'width="20", height="20", alt=""'); } else { $html = $status; } } } } } return $html; }