public function testdisplay_flow_bar()
 {
     //execute the method and test if it doesn't throw an exception.
     //this method uses flush so we cannot get and verify content printed
     try {
         ob_start();
         display_flow_bar('test', 0, 200, false);
         ob_end_clean();
         $this->assertTrue(true);
     } catch (Exception $e) {
         $this->fail();
     }
 }
Example #2
0
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE.  See the GNU Affero General Public License for more
 * details.
 *
 * You should have received a copy of the GNU Affero General Public License along with
 * this program; if not, see http://www.gnu.org/licenses or write to the Free
 * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
 * 02110-1301 USA.
 *
 * You can contact SugarCRM, Inc. headquarters at 10050 North Wolfe Road,
 * SW2-130, Cupertino, CA 95014, USA. or at email address contact@sugarcrm.com.
 *
 * The interactive user interfaces in modified source and object code versions
 * of this program must display Appropriate Legal Notices, as required under
 * Section 5 of the GNU Affero General Public License version 3.
 *
 * In accordance with Section 7(b) of the GNU Affero General Public License version 3,
 * these Appropriate Legal Notices must retain the display of the "Powered by
 * SugarCRM" logo and "Supercharged by SuiteCRM" logo. If the display of the logos is not
 * reasonably feasible for  technical reasons, the Appropriate Legal Notices must
 * display the words  "Powered by SugarCRM" and "Supercharged by SuiteCRM".
 ********************************************************************************/
ob_start();
require_once '../include/utils/progress_bar_utils.php';
display_flow_bar('myflow', 1);
display_progress_bar('myprogress', 0, 10);
for ($i = 0; $i <= 10; $i++) {
    update_progress_bar('myprogress', $i, 10);
    sleep(1);
}
destroy_flow_bar('myflow');
Example #3
0
 * install or use this SugarCRM file.
 *
 * Copyright (C) SugarCRM Inc. All rights reserved.
 */
set_time_limit(3600);
ini_set('default_socket_timeout', 360);
global $theme, $sugar_config;
insert_popup_header($theme);
require_once 'modules/Sync/SyncHelper.php';
require_once 'soap/SoapHelperFunctions.php';
require_once 'include/utils/progress_bar_utils.php';
global $soapclient, $soap_server, $sync_modules;
progress_bar_flush();
if (isset($_GET['check_available'])) {
    echo get_form_header(translate('LBL_CHECKING_SYNC_AVAILABLE', 'Sync'), '', false);
    display_flow_bar('check_sync_available', 0.2);
    $start_time = $soapclient->call('get_gmt_time', array());
    destroy_flow_bar('check_sync_available');
    if ($start_time) {
        $_SESSION['soap_server_available'] = true;
        echo '<b>' . translate('LBL_SERVER_AVAILABLE', 'Sync') . '</b>';
        sleep(1);
        if (isset($_REQUEST['clean_sync'])) {
            echo '<script>document.location.href="index.php?action=Popup&module=Sync&clean_sync=' . $_REQUEST['clean_sync'] . '"</script>';
        } else {
            echo '<script>document.location.href="index.php?action=Popup&module=Sync";</script>';
        }
        die;
    } else {
        $_SESSION['soap_server_available'] = false;
        echo '<b><font color="red">' . translate('LBL_SERVER_UNAVAILABLE', 'Sync') . '</font></b>';
Example #4
0
 * authority to bind the entity as an authorized representative, then do not
 * install or use this SugarCRM file.
 *
 * Copyright (C) SugarCRM Inc. All rights reserved.
 */
global $soapclient, $soap_server;
if ($sync_module_index == -1) {
    $current_step = 0;
    $module_steps = 4;
    global $timedate;
    echo '<table width="100%" class="edit view"><tr><td width="50%" valign="top">';
    echo get_form_header(translate('LBL_SYNC_SETUP', 'Sync'), '', false);
    display_progress_bar('sync_setup', $current_step, $module_steps);
    echo '<br>';
    echo '<div id="records_progress_div" style="display:inline">';
    display_flow_bar('file_update', 0.5);
    echo '</div></td><td><div id = "current_substatus">&nbsp;<div><br><input type="button" name="stop_sync_btn" id="stop_sync_btn" class="button" value="Stop Sync" onclick="window.close();"></td></tr></table>';
    echo '<table width="100%"><tr><td colspan="2" id="current_msg"  valign="top"><div id="show_conflict_div">&nbsp;<div></td></tr></table>';
    echo '<div id="current_status">&nbsp;</div>';
}
if ($sync_module_index == -1) {
    add_to_msg("Logging Into Server...");
}
$result = $soapclient->call('login', array('user_auth' => sync_get_user_auth_data(), 'application_name' => 'MobileClient'));
if (!has_error($result)) {
    $session = $result['id'];
    $_SESSION['sync_session'] = $session;
    //ensure that this system has not been disabled
    global $sugar_config;
    global $sugar_flavor;
    global $sugar_version;