Exemplo n.º 1
0
</td>
                <td><?php 
    echo substr($bug->openedDate, 5, 11);
    ?>
</td>
                <td><?php 
    echo $users[$bug->resolvedBy];
    ?>
</td>
                <td><?php 
    echo substr($bug->resolvedDate, 5, 11);
    ?>
</td>
                <td>
                  <?php 
    if (common::hasPriv('build', 'unlinkBug')) {
        $unlinkURL = inlink('unlinkBug', "buildID={$build->id}&bug={$bug->id}");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"bugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->build->unlinkBug}'");
    }
    ?>
                </td>
              </tr>
              <?php 
}
?>
              <tfoot>
                <tr>
                  <td colspan='8'>
                    <div class='table-actions clearfix'>
                      <?php 
if ($countBugs and $canBatchUnlink) {
Exemplo n.º 2
0
    ?>
</td>
      <td><?php 
    if ($user->last) {
        echo date('Y-m-d', $user->last);
    }
    ?>
</td>
      <td><?php 
    echo $user->visits;
    ?>
</td>
      <td class='a-left w-80px'>
        <?php 
    common::printIcon('user', 'edit', "userID={$user->id}&from=company", '', 'list');
    if (strpos($this->app->company->admins, ",{$user->account},") === false and common::hasPriv('user', 'delete')) {
        $deleteURL = $this->createLink('user', 'delete', "userID={$user->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"userList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->user->delete}' class='btn-icon'");
    }
    if (strtotime(date('Y-m-d H:i:s')) - strtotime($user->locked) < $this->config->user->lockMinutes * 60) {
        common::printIcon('user', 'unlock', "userID={$user->account}", '', 'list', '', "hiddenwin");
    }
    ?>
      </td>
    </tr>
    <?php 
}
?>
    </tbody>
    <tfoot>
    <tr>
Exemplo n.º 3
0
'>
      <div class='panel'>
        <div class='panel-heading'>
          <i class='icon-cog'></i> <strong><?php 
echo $title;
?>
</strong>
        </div>
        <div class='panel-body'>
          <div id='main'><?php 
echo $modules;
?>
</div>
          <div class='text-center'>
            <?php 
if (common::hasPriv('tree', 'updateorder')) {
    echo html::submitButton($lang->tree->updateOrder);
}
?>
          </div>
        </div>
      </div>
    </form>
  </div>
  <div class='col-sm-6 col-md-8 col-lg-9'>
    <form class='form-condensed' method='post' target='hiddenwin' action='<?php 
echo $this->createLink('tree', 'manageChild', "root={$root->id}&viewType=task");
?>
'>
      <div class='panel'>
        <div class='panel-heading'>
Exemplo n.º 4
0
    ?>
</td>
                    <td><?php 
    echo $users[$bug->assignedTo];
    ?>
</td>
                    <td class='bug-<?php 
    echo $bug->status;
    ?>
'><?php 
    echo $lang->bug->statusList[$bug->status];
    ?>
</td>
                    <td>
                      <?php 
    if (common::hasPriv('productplan', 'unlinkBug')) {
        $unlinkURL = $this->createLink('productplan', 'unlinkBug', "story={$bug->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"bugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->productplan->unlinkBug}'");
    }
    ?>
                    </td>
                  </tr>
                  <?php 
}
?>
                </tbody>
                <tfoot>
                <tr>
                  <td colspan='7'>
                    <div class='table-actions clearfix'>
                      <?php 
Exemplo n.º 5
0
<div id='titlebar'>
  <div class='heading'>
    <span class='prefix'><?php 
echo html::icon($lang->icons['bug']);
?>
</span>
    <strong><small class='text-muted'><?php 
echo html::icon($lang->icons['batchCreate']);
?>
</small> <?php 
echo $lang->bug->common . $lang->colon . $lang->bug->batchCreate;
?>
</strong>
    <div class='actions'>
      <?php 
if (common::hasPriv('file', 'uploadImages')) {
    echo html::a($this->createLink('file', 'uploadImages', 'module=bug&params=' . helper::safe64Encode("productID={$productID}&projectID={$projectID}&moduleID={$moduleID}")), $lang->uploadImages, '', "data-toggle='modal' data-type='iframe' class='btn' data-width='600px'");
}
?>
      <?php 
echo html::commonButton($lang->pasteText, "data-toggle='myModal'");
?>
    </div>
  </div>
</div>

<form class='form-condensed' class='form-condensed' method='post' target='hiddenwin'>
  <table class='table table-fixed table-form'>
    <thead>
      <tr>
        <th class='w-50px'>  <?php 
Exemplo n.º 6
0
  </tr>
  <?php 
    $times += $effort->consumed;
    ?>
  <?php 
}
?>
  </tbody>
  <tfoot>
    <tr>
      <td colspan='7'>
        <div class='table-actions clearfix'>
          <?php 
if ($efforts) {
    echo html::selectAll() . html::selectReverse();
    if (common::hasPriv('effort', 'batchEdit')) {
        echo html::submitButton($lang->effort->batchEdit);
    }
}
if ($times) {
    printf('<div class="text">' . $lang->company->effort->timeStat . '</div>', $times);
}
?>
        </div>
        <?php 
$pager->show();
?>
      </td>
    </tr>
  </tfoot>
</table>
Exemplo n.º 7
0
    ?>
</td>
      <td class='text-left nobr'><nobr><?php 
    echo html::a($viewLink, $doc->title);
    ?>
</nobr></td>
      <td><?php 
    echo $users[$doc->addedBy];
    ?>
</td>
      <td><?php 
    echo $doc->addedDate;
    ?>
</td>
      <td>
        <?php 
    common::printIcon('doc', 'edit', "doc={$doc->id}", '', 'list');
    if (common::hasPriv('doc', 'delete')) {
        $deleteURL = $this->createLink('doc', 'delete', "docID={$doc->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"docList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->doc->delete}'");
    }
    ?>
      </td>
    </tr>
    <?php 
}
?>
  </tbody>
</table>
<?php 
include '../../common/view/footer.html.php';
Exemplo n.º 8
0
    ?>
'><?php 
    echo $lang->bug->statusList[$bug->status];
    ?>
</td>
                <td><?php 
    echo $users[$bug->openedBy];
    ?>
</td>
                <td><?php 
    echo $bug->openedDate;
    ?>
</td>
                <td>
                  <?php 
    if (common::hasPriv('release', 'unlinkBug')) {
        $unlinkURL = $this->createLink('release', 'unlinkBug', "releaseID={$release->id}&bug={$bug->id}&type=leftBug");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"leftBugList\",confirmUnlinkBug)", '<i class="icon-unlink"></i>', '', "class='btn-icon' title='{$lang->release->unlinkBug}'");
    }
    ?>
                </td>
              </tr>
              <?php 
}
?>
              <tfoot>
                <tr>
                  <td colspan='7'>
                    <div class='table-actions clearfix'>
                      <div class='text'>
                        <?php 
Exemplo n.º 9
0
}
?>
  </tbody>
  <tfoot>
  <tr>
    <td colspan='<?php 
echo count($customFields) + 1;
?>
'>
      <?php 
if (!empty($bugs)) {
    ?>
      <div class='f-left'>
        <?php 
    echo html::selectAll() . html::selectReverse();
    if (common::hasPriv('bug', 'batchEdit') and $bugs) {
        echo html::submitButton($lang->edit);
    }
    ?>
      </div>
      <?php 
}
?>
      <div class='f-right'><?php 
$pager->show();
?>
</div>
    </td>
  </tr>
  </tfoot>
</table>
Exemplo n.º 10
0
        if ($cron->buildin == 0 and common::hasPriv('cron', 'delete')) {
            echo html::a(inlink('delete', "id={$cron->id}"), $lang->delete, 'hiddenwin');
        }
        ?>
        </td>
      </tr>
    <?php 
    }
    ?>
    </tbody>
  </table>
</div>
<?php 
} else {
    ?>
<div class='container mw-700px'>
  <div class='panel-body'>
    <?php 
    echo $lang->cron->introduction;
    if (common::hasPriv('cron', 'turnon')) {
        printf($lang->cron->confirmOpen, inlink('turnon'));
    }
    ?>
  </div>
</div>
<?php 
}
include '../../common/view/footer.html.php';
?>

Exemplo n.º 11
0
 /**
  * Print the module menu.
  * 
  * @param  string $moduleName 
  * @static
  * @access public
  * @return void
  */
 public static function printModuleMenu($moduleName)
 {
     global $lang, $app;
     if (!isset($lang->{$moduleName}->menu)) {
         echo "<ul></ul>";
         return;
     }
     /* Get the sub menus of the module, and get current module and method. */
     $submenus = $lang->{$moduleName}->menu;
     $currentModule = $app->getModuleName();
     $currentMethod = $app->getMethodName();
     /* Sort the subMenu according to menuOrder. */
     if (isset($lang->{$moduleName}->menuOrder)) {
         $menus = json_decode(json_encode($submenus), true);
         $submenus = new stdclass();
         ksort($lang->{$moduleName}->menuOrder, SORT_ASC);
         if (isset($menus['list'])) {
             $submenus->list = $menus['list'];
             unset($menus['list']);
         }
         foreach ($lang->{$moduleName}->menuOrder as $order) {
             if ($order != 'list' && isset($menus[$order])) {
                 $subOrder = $menus[$order];
                 unset($menus[$order]);
                 $submenus->{$order} = $subOrder;
             }
         }
         foreach ($menus as $key => $menu) {
             $submenus->{$key} = $menu;
         }
     }
     /* The beginning of the menu. */
     echo "<ul class='nav'>\n";
     /* Cycling to print every sub menus. */
     foreach ($submenus as $subMenuKey => $submenu) {
         /* Init the these vars. */
         $link = $submenu;
         $subModule = '';
         $alias = '';
         $float = '';
         $active = '';
         $target = '';
         if (is_array($submenu)) {
             extract($submenu);
         }
         // If the sub menu is an array, extract it.
         /* Print the menu. */
         if (strpos($link, '|') === false) {
             echo "<li>{$link}</li>\n";
         } else {
             $link = explode('|', $link);
             list($label, $module, $method) = $link;
             $vars = isset($link[3]) ? $link[3] : '';
             if (common::hasPriv($module, $method)) {
                 /* Is the currentModule active? */
                 $subModules = explode(',', $subModule);
                 if (in_array($currentModule, $subModules) and $float != 'right') {
                     $active = 'active';
                 }
                 if ($module == $currentModule and ($method == $currentMethod or strpos(",{$alias},", ",{$currentMethod},") !== false) and $float != 'right') {
                     $active = 'active';
                 }
                 echo "<li class='{$float} {$active}'>" . html::a(helper::createLink($module, $method, $vars), $label, $target, "id=submenu{$subMenuKey}") . "</li>\n";
             }
         }
     }
     echo "</ul>\n";
 }
Exemplo n.º 12
0
  <div class='actions'>
    <div class='btn-group'>
      <div class='btn-group'>
        <button type='button' class='btn btn-default dropdown-toggle' data-toggle='dropdown'>
          <i class='icon-download-alt'></i> <?php 
echo $lang->export;
?>
          <span class='caret'></span>
        </button>
        <ul class='dropdown-menu' id='exportActionMenu'>
        <?php 
$misc = common::hasPriv('testcase', 'export') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'export') ? $this->createLink('testcase', 'export', "productID={$productID}&orderBy={$orderBy}") : '#';
echo "<li>" . html::a($link, $lang->testcase->export, '', $misc) . "</li>";
$misc = common::hasPriv('testcase', 'exportTemplet') ? "class='export'" : "class=disabled";
$link = common::hasPriv('testcase', 'exportTemplet') ? $this->createLink('testcase', 'exportTemplet', "productID={$productID}") : '#';
echo "<li>" . html::a($link, $lang->testcase->exportTemplet, '', $misc) . "</li>";
?>
        </ul>
      </div>
      <?php 
common::printIcon('testcase', 'import', "productID={$productID}", '', 'button', '', '', 'export cboxElement iframe');
$initModule = isset($moduleID) ? (int) $moduleID : 0;
common::printIcon('testcase', 'batchCreate', "productID={$productID}&moduleID={$initModule}");
common::printIcon('testcase', 'create', "productID={$productID}&moduleID={$initModule}");
?>
    </div>
  </div>
  <div id='querybox' class='<?php 
if ($browseType == 'bysearch') {
    echo 'show';
Exemplo n.º 13
0
        echo $lang->testcase->resultList[$run->lastRunResult];
    }
    ?>
</td>
          <td class='<?php 
    echo $run->status;
    ?>
'><?php 
    echo $run->version < $run->caseVersion ? "<span class='warning'>{$lang->testcase->changed}</span>" : $lang->testtask->statusList[$run->status];
    ?>
</td>
          <td class='text-center'>
            <?php 
    common::printIcon('testtask', 'runCase', "id={$run->id}", '', 'list', '', '', 'runCase iframe');
    common::printIcon('testtask', 'results', "id={$run->id}", '', 'list', '', '', 'iframe');
    if (common::hasPriv('testtask', 'unlinkCase')) {
        $unlinkURL = $this->createLink('testtask', 'unlinkCase', "caseID={$run->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"caseList\",confirmUnlink)", '<i class="icon-unlink"></i>', '', "title='{$lang->testtask->unlinkCase}' class='btn-icon'");
    }
    common::printIcon('testcase', 'createBug', "product={$productID}&extra=projectID={$task->project},buildID={$task->build},caseID={$run->case},version={$run->version},runID={$run->id},testtask={$taskID}", $run, 'list', 'bug', '', 'iframe');
    ?>
          </td>
        </tr>
        <?php 
}
?>
      </tbody>
      <tfoot>
        <tr>
          <td colspan='10'>
            <?php 
Exemplo n.º 14
0
    ?>
</td>
        <td class='story-<?php 
    echo $story->status;
    ?>
'><?php 
    echo $lang->story->statusList[$story->status];
    ?>
</td>
        <td><?php 
    echo $lang->story->stageList[$story->stage];
    ?>
</td>
        <td class='text-center'>
          <?php 
    if (common::hasPriv('productplan', 'unlinkStory')) {
        $unlinkURL = $this->createLink('productplan', 'unlinkStory', "storyID={$story->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$unlinkURL}\",\"storyList\",confirmUnlinkStory)", '<i class="icon-remove"></i>', '', "title='{$lang->productplan->unlinkStory}' class='btn-icon'");
    }
    ?>
        </td>
      </tr>
      <?php 
}
?>
      <?php 
if (count($planStories) and $canBatchUnlink) {
    ?>
      <tfoot>
      <tr>
        <td colspan='9' class='text-left'>
Exemplo n.º 15
0
 /**
  * Create the task manage link of a module.
  * 
  * @param  int    $productID 
  * @param  int    $module 
  * @access public
  * @return void
  */
 public function createTaskManageLink($type, $module, $extra)
 {
     $projectID = $extra['projectID'];
     $productID = $extra['productID'];
     $tip = $extra['tip'];
     $linkHtml = $module->name;
     $linkHtml .= ($tip and $module->type != 'story') ? ' [T]' : '';
     if ($module->type == 'story') {
         if (common::hasPriv('tree', 'browseTask')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'browsetask', "rootID={$projectID}&productID={$productID}&module={$module->id}"), $this->lang->tree->child);
         }
     } else {
         if (common::hasPriv('tree', 'edit')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'edit', "module={$module->id}&type=task"), $this->lang->tree->edit, '', 'data-toggle="modal" data-type="ajax"');
         }
         if (common::hasPriv('tree', 'browseTask')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'browsetask', "rootID={$projectID}&productID={$productID}&module={$module->id}"), $this->lang->tree->child);
         }
         if (common::hasPriv('tree', 'delete')) {
             $linkHtml .= ' ' . html::a(helper::createLink('tree', 'delete', "root={$module->root}&module={$module->id}"), $this->lang->delete, 'hiddenwin');
         }
         if (common::hasPriv('tree', 'updateorder')) {
             $linkHtml .= ' ' . html::input("orders[{$module->id}]", $module->order, 'style="width:30px;text-align:center"');
         }
     }
     return $linkHtml;
 }
Exemplo n.º 16
0
      <th class='w-user'>  <?php 
common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);
?>
</th>
      <th class='w-140px'> <?php 
echo $lang->actions;
?>
</th>
    </tr>
    </thead>   
    <tbody>
    <?php 
$canBatchEdit = common::hasPriv('task', 'batchEdit');
?>
    <?php 
$canBatchClose = (common::hasPriv('task', 'batchClose') and $type != 'closedBy');
?>
    <?php 
foreach ($tasks as $task) {
    ?>
    <tr class='text-center'>
      <td class='text-left'>
        <?php 
    if ($canBatchEdit or $canBatchClose) {
        ?>
<input type='checkbox' name='taskIDList[]' value='<?php 
        echo $task->id;
        ?>
' /><?php 
    }
    ?>
Exemplo n.º 17
0
?>
</th>
      <th class='w-severity'>  <?php 
common::printOrderLink('severity', $orderBy, $vars, $lang->bug->severityAB);
?>
</th>
      <th class='w-pri'>       <?php 
common::printOrderLink('pri', $orderBy, $vars, $lang->priAB);
?>
</th>
      <th class='w-type'>      <?php 
common::printOrderLink('type', $orderBy, $vars, $lang->typeAB);
?>
</th>
      <th>                     <?php 
common::printOrderLink('title', $orderBy, $vars, $lang->bug->title);
?>
</th>
      <th class='w-user'>      <?php 
common::printOrderLink('openedBy', $orderBy, $vars, $lang->openedByAB);
?>
</th>
      <th class='w-user'>      <?php 
common::printOrderLink('assignedTo', $orderBy, $vars, $lang->bug->assignedTo);
?>
</th>
      <th class='w-user'>      <?php 
common::printOrderLink('resolvedBy', $orderBy, $vars, $lang->bug->resolvedByAB);
?>
</th>
      <th class='w-resolution'><?php 
Exemplo n.º 18
0
     echo '<li>' . html::a('javascript:;', $lang->story->planAB, '', $class) . '</li>';
 }
 if (common::hasPriv('story', 'batchChangeStage')) {
     echo "<li class='dropdown-submenu'>";
     echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
     echo "<ul class='dropdown-menu'>";
     $lang->story->stageList[''] = $lang->null;
     foreach ($lang->story->stageList as $key => $stage) {
         $actionLink = $this->createLink('story', 'batchChangeStage', "stage={$key}");
         echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('{$actionLink}','hiddenwin')\"") . "</li>";
     }
     echo '</ul></li>';
 } else {
     echo '<li>' . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
 }
 if (common::hasPriv('story', 'batchAssignTo')) {
     $withSearch = count($users) > 10;
     $actionLink = $this->createLink('story', 'batchAssignTo', "productID={$productID}");
     echo html::select('assignedTo', $users, '', 'class="hidden"');
     echo "<li class='dropdown-submenu'>";
     echo html::a('javascript::', $lang->story->assignedTo, 'id="assignItem"');
     echo "<ul class='dropdown-menu" . ($withSearch ? ' with-search' : '') . "'>";
     foreach ($users as $key => $value) {
         if (empty($key)) {
             continue;
         }
         echo "<li class='option' data-key='{$key}'>" . html::a("javascript:\$(\".table-actions #assignedTo\").val(\"{$key}\");setFormAction(\"{$actionLink}\")", $value, '', '') . '</li>';
     }
     if ($withSearch) {
         echo "<li class='menu-search'><div class='input-group input-group-sm'><input type='text' class='form-control' placeholder=''><span class='input-group-addon'><i class='icon-search'></i></span></div></li>";
     }
Exemplo n.º 19
0
 /**
  * User login, identify him and authorize him.
  * 
  * @access public
  * @return void
  */
 public function login($referer = '', $from = '')
 {
     $this->setReferer($referer);
     $loginLink = $this->createLink('user', 'login');
     $denyLink = $this->createLink('user', 'deny');
     /* Reload lang by lang of get when viewType is json. */
     if ($this->app->getViewType() == 'json' and $this->get->lang and $this->get->lang != $this->app->getClientLang()) {
         $this->app->setClientLang($this->get->lang);
         $this->app->loadLang('user');
     }
     /* If user is logon, back to the rerferer. */
     if ($this->user->isLogon()) {
         if ($this->app->getViewType() == 'json') {
             $data = $this->user->getDataInJSON($this->app->user);
             die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
         }
         if (strpos($this->referer, $loginLink) === false and strpos($this->referer, $denyLink) === false and $this->referer) {
             die(js::locate($this->referer, 'parent'));
         } else {
             die(js::locate($this->createLink($this->config->default->module), 'parent'));
         }
     }
     /* Passed account and password by post or get. */
     if (!empty($_POST) or isset($_GET['account']) and isset($_GET['password'])) {
         $account = '';
         $password = '';
         if ($this->post->account) {
             $account = $this->post->account;
         }
         if ($this->get->account) {
             $account = $this->get->account;
         }
         if ($this->post->password) {
             $password = $this->post->password;
         }
         if ($this->get->password) {
             $password = $this->get->password;
         }
         if ($this->user->checkLocked($account)) {
             $failReason = sprintf($this->lang->user->loginLocked, $this->config->user->lockMinutes);
             if ($this->app->getViewType() == 'json') {
                 die(helper::removeUTF8Bom(json_encode(array('status' => 'failed', 'reason' => $failReason))));
             }
             die(js::error($failReason));
         }
         $user = $this->user->identify($account, $password);
         if ($user) {
             $this->user->cleanLocked($account);
             /* Authorize him and save to session. */
             $user->rights = $this->user->authorize($account);
             $user->groups = $this->user->getGroups($account);
             $this->session->set('user', $user);
             $this->app->user = $this->session->user;
             $this->loadModel('action')->create('user', $user->id, 'login');
             /* Keep login. */
             if ($this->post->keepLogin) {
                 $this->user->keepLogin($user);
             }
             /* Check password. */
             if (isset($this->config->safe->mode) and $this->user->computePasswordStrength($password) < $this->config->safe->mode) {
                 echo js::alert($this->lang->user->weakPassword);
             }
             /* Go to the referer. */
             if ($this->post->referer and strpos($this->post->referer, $loginLink) === false and strpos($this->post->referer, $denyLink) === false) {
                 if ($this->app->getViewType() == 'json') {
                     $data = $this->user->getDataInJSON($user);
                     die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
                 }
                 /* Get the module and method of the referer. */
                 if ($this->config->requestType == 'PATH_INFO') {
                     $path = substr($this->post->referer, strrpos($this->post->referer, '/') + 1);
                     $path = rtrim($path, '.html');
                     if (empty($path)) {
                         $path = $this->config->requestFix;
                     }
                     list($module, $method) = explode($this->config->requestFix, $path);
                 } else {
                     $url = html_entity_decode($this->post->referer);
                     $param = substr($url, strrpos($url, '?') + 1);
                     list($module, $method) = explode('&', $param);
                     $module = str_replace('m=', '', $module);
                     $method = str_replace('f=', '', $method);
                 }
                 if (common::hasPriv($module, $method)) {
                     die(js::locate($this->post->referer, 'parent'));
                 } else {
                     die(js::locate($this->createLink($this->config->default->module), 'parent'));
                 }
             } else {
                 if ($this->app->getViewType() == 'json') {
                     $data = $this->user->getDataInJSON($user);
                     die(helper::removeUTF8Bom(json_encode(array('status' => 'success') + $data)));
                 }
                 die(js::locate($this->createLink($this->config->default->module), 'parent'));
             }
         } else {
             $fails = $this->user->failPlus($account);
             if ($this->app->getViewType() == 'json') {
                 die(helper::removeUTF8Bom(json_encode(array('status' => 'failed', 'reason' => $this->lang->user->loginFailed))));
             }
             $remainTimes = $this->config->user->failTimes - $fails;
             if ($remainTimes <= 0) {
                 die(js::error(sprintf($this->lang->user->loginLocked, $this->config->user->lockMinutes)));
             } else {
                 if ($remainTimes <= 3) {
                     die(js::error(sprintf($this->lang->user->lockWarning, $remainTimes)));
                 }
             }
             die(js::error($this->lang->user->loginFailed));
         }
     } else {
         if (!empty($this->config->global->showDemoUsers)) {
             $demoUsers = $this->user->getPairs('nodeleted, noletter, noempty, noclosed');
             $this->view->demoUsers = $demoUsers;
         }
         $this->app->loadLang('misc');
         $this->view->noGDLib = sprintf($this->lang->misc->noGDLib, common::getSysURL() . $this->config->webRoot);
         $this->view->title = $this->lang->user->login;
         $this->view->referer = $this->referer;
         $this->view->s = zget($this->config->global, 'sn');
         $this->view->keepLogin = $this->cookie->keepLogin ? $this->cookie->keepLogin : '******';
         $this->display();
     }
 }
Exemplo n.º 20
0
      <?php 
}
?>
    </div>
    <div style='padding: 0 10px 10px;'>
      <?php 
echo html::submitButton($lang->crystal->query, "class='btn'");
?>
      <?php 
echo html::commonButton($lang->crystal->addVar, "class='btn addVar'");
?>
      <?php 
echo html::a(inlink('ajaxSetLang', "reportID={$reportID}"), $lang->crystal->addLang, '', "class='btn' data-toggle='modal' data-type='iframe'");
?>
      <?php 
if (common::hasPriv('report', 'saveReport')) {
    $save = $lang->save;
    echo "<div class='btn-group'>";
    if ($reportID) {
        echo html::a(inlink('saveReport', "reportID={$reportID}&step={$step}"), $lang->save, 'hiddenwin', "class='btn'");
        $save = $lang->crystal->saveAs;
    }
    echo html::a(inlink('saveReport', "reportID=0&step={$step}"), $save, '', "class='btn' data-type='iframe' data-toggle='modal'");
    echo '</div>';
}
?>
    </div>
  </form>
</div>

<div id='setVar' class="modal fade" tabindex="-1" role="dialog" aria-hidden="true">
<div class='block'>
<table class='table-1 colored fixed'>
  <caption>
    <div class='f-left'><span class='icon-dynamic'></span><?php 
echo $lang->my->home->latest;
?>
</div>
    <div class='f-right'><?php 
common::printLink('company', 'dynamic', '', $lang->more . "<span class='icon-more'></span>");
?>
</div>
  </caption>
  <?php 
foreach ($actions as $action) {
    $canView = false;
    if (common::hasPriv('company', 'dynamic')) {
        $canView = true;
    }
    if ($action->product == 0 and $action->project == 0) {
        $canView = true;
    }
    if (isset($productStats['products'][$action->product]) or isset($projectStats['projects'][$action->project])) {
        $canView = true;
    }
    if (!$canView) {
        continue;
    }
    $user = isset($users[$action->actor]) ? $users[$action->actor] : $action->actor;
    if ($action->action == 'login' or $action->action == 'logout') {
        $action->objectName = '';
    }
    common::printLink('task', 'create', $param, $lang->project->wbs);
    common::printLink('project', 'unlinkStory', $param, $lang->unlink, 'hiddenwin');
    ?>
        </td>
      </tr>
      <?php 
}
?>
    </tbody>
    <tfoot>
      <tr>
        <td colspan='10'>
          <div class='f-left'>
          <?php 
if (count($stories)) {
    echo html::selectAll() . html::selectReverse();
    if (common::hasPriv('story', 'batchClose')) {
        $actionLink = $this->createLink('story', 'batchClose', "from=projectStory&productID=0&projectID={$project->id}&orderBy={$orderBy}");
        echo html::commonButton($lang->story->batchClose, "onclick=\"changeAction('projectStoryForm', 'batchClose', '{$actionLink}')\"");
    }
}
printf($lang->product->storySummary, count($stories), $totalEstimate, round(array_sum($estimateSum) * $pcwh), round(array_sum($consumedSum) * $pcwh));
?>
          </div>
        </td>
      </tr>
    </tfoot>
  </table>
</form>
<?php 
include '../../common/view/footer.html.php';
Exemplo n.º 23
0
<div class='panel'>
  <div class='panel-heading'>
    <strong><?php 
echo $lang->crystal->result;
?>
</strong>
    <?php 
if (common::hasPriv('report', 'crystalExport') and !empty($dataList)) {
    ?>
    <div class='panel-actions pull-right'><?php 
    echo html::a(inlink('crystalExport', "step={$step}&reportID={$reportID}"), $lang->export, '', "class='export btn btn-sm btn-primary'");
    ?>
</div>
    <?php 
}
?>
  </div>
  <?php 
if ($step == 2 and $reportData) {
    ?>
  <?php 
    include 'reportdata.html.php';
    ?>
  <?php 
} else {
    ?>
  <div class='panel-body scroll-table'>
    <table class='table'>
      <tr>
        <?php 
    foreach ($fields as $field) {
Exemplo n.º 24
0
    ?>
images/main/green.png' width=<?php 
    echo $sprint->hours->progress;
    ?>
 height='13' text-align: />
      <small><?php 
    echo $sprint->hours->progress;
    ?>
%</small>
    </td>
	<td class='text-right'>
	<?php 
    if (common::hasPriv('pro', 'sprintedit')) {
        common::printIcon('pro', 'sprintedit', "id={$sprint->id}", '', 'list', 'pencil', '', 'iframe', true);
    }
    if (common::hasPriv('pro', 'delete')) {
        $deleteURL = $this->createLink('pro', 'delete', "projectID={$sprint->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"projectList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->project->delete}'");
    }
    ?>
      </td>
	</td>
    <!-- <td class='projectline text-center' values='<?php 
    //echo join(',', $sprint->burns);
    ?>
'></td> -->
 </tr>
 <?php 
}
?>
</table>
Exemplo n.º 25
0
'>
          <div class='table-actions clearfix'>
            <?php 
    if ($canBatchEdit and !empty($productStats)) {
        ?>
            <?php 
        echo "<div class='btn-group'>" . html::selectButton() . '</div>';
        ?>
            <?php 
        echo html::submitButton($lang->product->batchEdit, '', '');
        ?>
            <?php 
    }
    ?>
            <?php 
    if (!$canOrder and common::hasPriv('product', 'updateOrder')) {
        echo html::a(inlink('index', "locate=no&productID={$productID}&status={$status}&order=order_desc&recTotal={$pager->recTotal}&recPerPage={$pager->recPerPage}&pageID={$pager->pageID}"), $lang->product->updateOrder, '', "class='btn'");
    }
    ?>
          </div>
          <div class='text-right'><?php 
    $pager->show();
    ?>
</div>
        </td>
      </tr>
    </tfoot>
  </table>
</form>
<?php 
}
Exemplo n.º 26
0
             foreach ($lang->story->reasonList as $key => $reason) {
                 $actionLink = $this->createLink('story', 'batchReview', "result=reject&reason={$key}");
                 echo "<li>";
                 echo html::a('#', $reason, '', "onclick=\"setFormAction('{$actionLink}','hiddenwin')\"");
                 echo "</li>";
             }
             echo '</ul></li>';
         } else {
             echo '<li>' . html::a('#', $result, '', "onclick=\"setFormAction('{$actionLink}','hiddenwin')\"") . '</li>';
         }
     }
     echo '</ul></li>';
 } else {
     echo '<li>' . html::a('javascript:;', $lang->story->review, '', $class) . '</li>';
 }
 if (common::hasPriv('story', 'batchChangeStage')) {
     echo "<li class='dropdown-submenu'>";
     echo html::a('javascript:;', $lang->story->stageAB, '', "id='stageItem'");
     echo "<ul class='dropdown-menu'>";
     $lang->story->stageList[''] = $lang->null;
     foreach ($lang->story->stageList as $key => $stage) {
         $actionLink = $this->createLink('story', 'batchChangeStage', "stage={$key}");
         echo "<li>" . html::a('#', $stage, '', "onclick=\"setFormAction('{$actionLink}','hiddenwin')\"") . "</li>";
     }
     echo '</ul></li>';
 } else {
     echo '<li>' . html::a('javascript:;', $lang->story->stageAB, '', $class) . '</li>';
 }
 ?>
           </ul>
         </div>
Exemplo n.º 27
0
    ?>
</td>
    <td><?php 
    echo $task->end;
    ?>
</td>
    <td><?php 
    echo $lang->testtask->statusList[$task->status];
    ?>
</td>
    <td class='text-right'>
      <?php 
    common::printIcon('testtask', 'cases', "taskID={$task->id}", 'play', 'list', 'smile');
    common::printIcon('testtask', 'linkCase', "taskID={$task->id}", '', 'list', 'link');
    common::printIcon('testtask', 'edit', "taskID={$task->id}", '', 'list');
    if (common::hasPriv('testtask', 'delete')) {
        $deleteURL = $this->createLink('testtask', 'delete', "taskID={$task->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"taskList\",confirmDelete)", '<i class="icon-remove"></i>', '', "title='{$lang->testtask->delete}' class='btn-icon'");
    }
    ?>
    </td>
  </tr>
  <?php 
}
?>
  </tbody>
  <tfoot><tr><td colspan='8'><?php 
$pager->show();
?>
</td></tr></tfoot>
</table>
Exemplo n.º 28
0
      <td><?php 
    echo $todo->end;
    ?>
</td>
      <td class='<?php 
    echo $todo->status;
    ?>
'><?php 
    echo $lang->todo->statusList[$todo->status];
    ?>
</td>
      <td class='text-right'>
        <?php 
    common::printIcon('todo', 'finish', "id={$todo->id}", $todo, 'list', 'ok-sign', 'hiddenwin');
    common::printIcon('todo', 'edit', "id={$todo->id}", '', 'list', 'pencil', '', 'iframe', true);
    if (common::hasPriv('todo', 'delete')) {
        $deleteURL = $this->createLink('todo', 'delete', "todoID={$todo->id}&confirm=yes");
        echo html::a("javascript:ajaxDelete(\"{$deleteURL}\",\"todoList\",confirmDelete)", '<i class="icon-remove"></i>', '', "class='btn-icon' title='{$lang->todo->delete}'");
    }
    ?>
      </td>
    </tr>
    <?php 
}
?>
    </tbody>
    <?php 
if (count($todos)) {
    ?>
    <tfoot>
      <tr>
Exemplo n.º 29
0
?>
</th>
          <th class='w-60px'><?php 
echo $lang->actions;
?>
</th>
        </tr>
        </thead>
        <tbody>
        <form action='<?php 
echo $this->createLink('user', 'batchEdit', "deptID={$deptID}");
?>
' method='post' id='userListForm'>
        <?php 
$canBatchEdit = common::hasPriv('user', 'batchEdit');
$canManageContacts = common::hasPriv('user', 'manageContacts');
?>
        <?php 
foreach ($users as $user) {
    ?>
        <tr class='a-center'>
          <td>
            <?php 
    if ($canBatchEdit or $canManageContacts) {
        echo "<input type='checkbox' name='users[]' value='{$user->account}'> ";
    }
    printf('%03d', $user->id);
    ?>
          </td>
          <td><?php 
    if (!common::printLink('user', 'view', "account={$user->account}", $user->realname)) {
Exemplo n.º 30
0
?>
</strong>
    </div>
  </div>
  <table class='table table-form' id='selectmta'>
    <tr>
      <td class='text-center'>
        <?php 
if (common::hasPriv('mail', 'detect')) {
    ?>
        <?php 
    echo html::a(inlink('detect'), $lang->mail->smtp, '', "class='btn btn-sm w-120px'");
    ?>
        <?php 
}
?>
        <?php 
if ($this->app->getClientLang() != 'en' and common::hasPriv('mail', 'sendCloud')) {
    ?>
        <?php 
    echo html::a(inlink('sendCloud'), $lang->mail->sendCloud, '', "class='btn btn-sm w-120px'");
    ?>
        <?php 
}
?>
      </td>
    </tr>
  </table>
</div>
<?php 
include '../../common/view/footer.html.php';