<?php

$page_security = 'SA_SALESANALYTIC';
// ----------------------------------------------------------------
// ----------------------------------------------------------------
$path_to_root = "..";
include_once $path_to_root . "/includes/session.inc";
include_once $path_to_root . "/includes/date_functions.inc";
include_once $path_to_root . "/includes/data_checks.inc";
include_once $path_to_root . "/sales/includes/sales_db.inc";
include_once $path_to_root . "/inventory/includes/db/items_category_db.inc";
//----------------------------------------------------------------------------------------------------
print_summary();
function getList($imc)
{
    $sql = "SELECT a.* from " . TB_PREF . "cust_branch a";
    if ($imc != 0) {
        $sql .= " where salesman =" . db_escape($imc);
    }
    $sql .= " ORDER BY a.salesman";
    return db_query($sql, "Error getting order details");
}
//----------------------------------------------------------------------------------------------------
function print_summary()
{
    global $path_to_root;
    $imc = $_POST['PARAM_0'];
    $comments = $_POST['PARAM_1'];
    $orientation = $_POST['PARAM_2'];
    $destination = $_POST['PARAM_3'];
    if ($destination) {
                echo '<td>&nbsp;</td>';
            }
        } else {
            echo '<td>&nbsp;</td>';
        }
        echo '<td>' . '<a href="story_List.php?PID=' . $_REQUEST['PID'] . '&IID=' . $iteration_Row['ID'] . '"' . ' title="' . $iteration_Row['Start_Date'] . ' -> ' . $iteration_Row['End_Date'] . '">' . substr($iteration_Row['Name'], 0, 32) . '</a>';
        if ($iteration_Row['ID'] != $Project['Backlog_ID']) {
            echo '<br><center>' . $iteration_Row['Start_Date'] . '<br>to<br> ' . $iteration_Row['End_Date'];
        } else {
            echo '<div class="evenlarger"><center><b>Velocity<br>' . $Project['Velocity'] . '</b></center></div>';
        }
        if ($iteration_Row['Locked'] == 1) {
            echo '<p><b>Locked</b>';
        }
        echo '</center></td>' . '<td>' . substr($iteration_Row['Objective'], 0, 64) . '</td>' . '<td>' . '<table><tr><td>';
        print_summary($iteration_Row['Points_Object_ID'], False);
        // without velocity
        echo '</td><td>&nbsp;';
        print_Graphx($iteration_Row['Points_Object_ID'], True);
        // Not Small
        echo '</td></tr></table></td>' . '<td>';
        if ($iteration_Row['Name'] != 'Backlog') {
            if ($isProjectAdmin and $iteration_Row['nums'] == 0) {
                echo '<a href="iteration_Delete.php?IID=' . $iteration_Row['ID'] . '&PID=' . $_REQUEST['PID'] . '&OID=' . $iteration_Row['Object_ID'] . '"><img src="images/delete.png"></a>';
            } else {
                echo '&nbsp;';
            }
        }
        echo '&nbsp;</td>' . '</tr>';
    } while ($iteration_Row = mysqli_fetch_assoc($iteration_Res));
}
Example #3
0
            }
            // print the tree
            $instr = rtrim($instr, ",");
            $sql = 'SELECT * FROM story where project_ID=' . $Rowp['relproj'] . ' and AID IN(' . $instr . ') order by story.project_ID, story.Epic_Rank';
            $tree_Res = mysqli_query($DBConn, $sql);
            echo '&nbsp; &nbsp;<a href="#" class="btnCollapseAll" id="' . $Rowp['relproj'] . '">Collapse</a>/';
            echo '<a href="#" class="btnExpandAll" id="' . $Rowp['relproj'] . '">Expand</a>';
            echo '<div class="tree" id="tree' . $Rowp['relproj'] . '"><ul><li class="larger">' . Get_Project_Name($Rowp['relproj']) . '<ul>';
            GetTree($tree_Res, 'nodnd');
            echo '</li></ul></ul>';
            echo '</div>';
        }
    } elseif ($_REQUEST['Root'] == 0) {
        // Project Tree
        echo '<table align="center" width=90%><tr><td align="center">';
        print_summary($Project['Points_Object_ID'], True);
        // with velocity
        echo '</td></tr><tr><td align="center">';
        print_Graphx($Project['Points_Object_ID'], False);
        // Not Small
        echo '</td></tr></table>';
        $sql = 'SELECT * FROM story where story.Project_ID=' . $_REQUEST['PID'] . ' and Parent_Story_ID=0 order by story.Epic_Rank';
        GetTreeRoot($sql);
    } else {
        GetTreeRoot($sql);
    }
}
// start Scrum Board
if ($_REQUEST['Type'] == 'board') {
    $colcount == 0;
    echo '<br>';
Example #4
0
            print_summary();
        }
        break;
    case 'start':
        if ($active) {
            error("[!] cannot start a new project while one is in progress\n");
        } else {
            start_working($argv[2]);
        }
        break;
    case 'stop':
        if ($active) {
            print_working(true);
        } else {
            error("[!] there are no active projects running\n");
        }
        break;
    case 'projects':
        print_projects();
        break;
    case 'print':
        print_tracker($active);
        break;
    case 'parse':
        print_summary(true);
        break;
    default:
        error("[!] invalid command\n");
        break;
}
fclose($f);
Example #5
0
function show_default()
{
    $can_manage_configuration = isAuthorized('manageConfiguration');
    $certificates = $_SESSION['service']->certificates_list();
    $certificates_limits = $_SESSION['service']->certificates_limits();
    page_header();
    echo '<div>';
    echo '<h1>' . _('Subscription Keys') . '</h1>';
    print_summary();
    echo '<div>';
    echo '<table border="0" cellspacing="1" cellpadding="3">';
    echo '<tr><th>' . _('Organization') . '</th><th>' . _('Subscription Key Owner') . '</th><th>' . _('Email') . '</th><th>' . _('Start Date (UTC)') . '</th><th>' . _('End Date  (UTC)') . '</th><th>' . _('Type') . '</th><th>' . _('Status') . '</th></tr>';
    foreach ($certificates as $certificate) {
        echo '<tr>';
        echo '<td>' . $certificate['organization'] . '</td>';
        echo '<td>' . $certificate['owner'] . '</td>';
        echo '<td>' . $certificate['email'] . '</td>';
        echo '<td>' . gmdate('m/d/Y H:i:s', $certificate['start']) . '</td>';
        echo '<td>' . gmdate('m/d/Y H:i:s', $certificate['expiry']) . '</td>';
        echo '<td>';
        if ($certificate['type'] == "EVAL") {
            echo _('Evaluation') . '<br/>';
        }
        if ($certificate['concurrent_users'] !== null) {
            echo _('Connected User Limit') . ' : ' . $certificate['concurrent_users'] . '<br/>';
        }
        if ($certificate['named_users'] !== null) {
            echo _('Assigned Users') . ' : ' . $certificate['named_users'] . '<br/>';
        }
        echo '</td>';
        if (!$certificate['valid']) {
            echo '<td class="msg_error">' . _('Invalid Subscription Key') . '</td>';
        } else {
            if ($certificate['expired']) {
                echo '<td class="msg_error">' . _('Subscription Key has expired') . '</td>';
            } else {
                $delta = get_expiry_days($certificate['expiry']);
                if ($delta < 0) {
                    echo '<td class="msg_error">' . _('Subscription Key expired') . '</td>';
                } elseif ($delta < 20) {
                    echo '<td class="msg_warn">' . sprintf(_('Only %d days remaining'), $delta) . '</td>';
                } else {
                    echo '<td class="msg_ok">' . sprintf(_('OK (%d days remaining)'), $delta) . '</td>';
                }
            }
        }
        if ($can_manage_configuration) {
            echo '<td><form action="actions.php" method="post" onsubmit="return confirm(\'' . _('Are you sure you want to delete this Subscription Key?') . '\');">';
            echo '<input type="hidden" name="name" value="Certificate" />';
            echo '<input type="hidden" name="action" value="del" />';
            echo '<input type="hidden" name="id" value="' . $certificate['id'] . '" />';
            echo '<input type="submit" value="' . _('Delete this Subscription Key') . '" />';
            echo '</form></td>';
        }
        echo '</tr>';
    }
    echo '</table>';
    echo '</div>';
    if ($can_manage_configuration) {
        echo '<div>';
        echo '<h2>' . _('Install a Subscription Key') . '</h2>';
        echo '<table border="0" cellspacing="1" cellpadding="5">';
        echo '<tr>';
        echo '<td>';
        echo '<form action="actions.php" method="post" enctype="multipart/form-data" >';
        echo '<input type="hidden" name="name" value="Certificate" />';
        echo '<input type="hidden" name="action" value="add" />';
        echo '<input type="file" name="certificate" /> ';
        echo '<input type="submit" value="' . _('Install this Subscription Key') . '" />';
        echo '</form>';
        echo '</td>';
        echo '</tr>';
        echo '</table>';
        echo '</div>';
    }
    if ($can_manage_configuration && !in_array($certificates_limits["named_users_max"], array(0, null))) {
        echo '<div>';
        echo '<h2>' . _('Assigned Users') . '</h2>';
        echo '<table border="0" cellspacing="1" cellpadding="5">';
        echo '<tr>';
        echo '<td>';
        echo '<form action="actions.php" method="post" enctype="multipart/form-data" >';
        echo '<input type="hidden" name="name" value="Certificate" />';
        echo '<input type="hidden" name="action" value="reset_named_users" />';
        echo '<input type="submit" value="' . _('Reset assigned users') . '" />';
        echo '</form>';
        echo '</td>';
        echo '</tr>';
        echo '</table>';
        echo '</div>';
    }
    echo '</div>';
    page_footer();
    die;
}
Example #6
0
/**
* Prints the basic reservation form elements
* This contains: resource data, time information/select, user info, create/modify times, recurring selection, pending info
* @param object $res Reservation object to work with
* @param array $rs resource data array
* @param bool $is_private if the privacy mode is on and we should hide personal data
*/
function print_basic_panel(&$res, &$rs, $is_private)
{
    global $conf;
    ?>
	<!-- Begin basic panel -->
      <div id="pnl_basic" style="display:table; width:100%; position: relative;">
        <table width="100%" cellpadding="0" cellspacing="0" border="0">
          <tr>
            <td>
			<!-- Content begin -->
<?php 
    print_resource_data($rs, $res->type == RES_TYPE_ADD ? 2 : 1);
    // Print resource info
    print_time_info($res, $rs, !$res->is_blackout, isset($rs['allow_multi']) && $rs['allow_multi'] == 1);
    // Print time information
    if (!$res->is_blackout && !$is_private) {
        print_user_info($res->type, $res->user);
        // Print user info
    }
    if (!empty($res->id)) {
        // Print created/modified times (if applicable)
        print_create_modify($res->created, $res->modified);
    }
    if (!$is_private) {
        print_summary($res->summary, $res->type);
    }
    if (!empty($res->parentid) && ($res->type == RES_TYPE_MODIFY || $res->type == RES_TYPE_DELETE || $res->type == RES_TYPE_APPROVE)) {
        print_recur_checkbox($res->parentid);
    }
    if ($res->type == RES_TYPE_MODIFY) {
        print_del_checkbox();
    }
    //AK: repeat reservation box and reminder box are not needed in out implementation
    //if ($res->type == RES_TYPE_ADD || $res->type == RES_TYPE_MODIFY) {		// Print out repeat reservation box, if applicable
    //	divide_table();
    //	if ($res->type == RES_TYPE_ADD) {
    //		print_repeat_box(date('m', $res->start_date), date('Y', $res->start_date));
    //		if( $res->is_pending ) {
    //			 print_pending_approval_msg();
    //		}
    //	}
    //	$reminder_times = $conf['app']['allowed_reminder_times'];
    //	print_reminder_box($reminder_times, $res->reminder_minutes_prior, $res->reminderid);
    //	}
    ?>
			<!-- Content end -->
			</td>
          </tr>
        </table>
      </div>
	  <!-- End basic panel -->
<?php 
}
    // if only have access to a single project, then go to that project.
    if (mysqli_num_rows($project_Res) == 1) {
        header("Location:project_Summary.php?PID=" . $project_Row['ID']);
    }
    do {
        $Project['ID'] = $project_Row['ID'];
        $Toggle = ($Toggle + 1) % 2;
        echo '<tr valign="top" class="alternate' . $Toggle . '">' . '<td>' . $project_Row['Category'] . '</td>' . '<td><a href="project_Summary.php?PID=' . $project_Row['ID'] . '">' . $project_Row['Name'] . '</a></td>' . '<td>' . $project_Row['Velocity'] . '</td>' . '<td>';
        $thisdate = Date("Y-m-d");
        $sql = 'SELECT ID, Name FROM iteration where iteration.Project_ID=' . $project_Row['ID'] . ' and iteration.Name <> "Backlog" and iteration.Start_Date<="' . $thisdate . '" and iteration.End_Date>="' . $thisdate . '"';
        $iteration_Res = mysqli_query($DBConn, $sql);
        $iteration_Row = mysqli_fetch_assoc($iteration_Res);
        echo '<a href="story_List.php?PID=' . $project_Row['ID'] . '&IID=' . $iteration_Row['ID'] . '" title = "Current Iteration" >' . substr($iteration_Row['Name'], 0, 14) . '</a>';
        echo '</td>';
        echo '<td>';
        print_summary($project_Row['Points_Object_ID']);
        echo '</td>';
        echo '<td><a href="story_List.php?PID=' . $project_Row['ID'] . '&IID=' . $project_Row['Backlog_ID'] . '">Backlog</a></td><td>';
        if ($project_Row['Archived'] == 1) {
            echo 'Yes';
        } else {
            echo 'No';
        }
        echo '</td><td>';
        if ($Usr['Admin_User'] == 1 && $project_Row['ID'] != 1) {
            echo '<a href="project_Delete.php?PID=' . $project_Row['ID'] . '"><img src="images/delete.png" title="Delete"></a>';
        }
        echo '</td>';
        echo '</tr>';
    } while ($project_Row = mysqli_fetch_assoc($project_Res));
}