Beispiel #1
0
<?php

require_once LIBPATH . "redfun.php";
require_once LIBPATH . "auth.php";
if (isset($_SESSION['userid'])) {
    if ($_REQUEST['action'] == "name") {
        name($_REQUEST['name'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "busy") {
        busy($_REQUEST['busy'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "contacts") {
        contacts($_REQUEST['phone'], $_REQUEST['email'], $_REQUEST['region'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "description") {
        description($_REQUEST['description'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "password") {
        pass($_REQUEST['pass'], $_REQUEST['oldpass'], $_SESSION['userid']);
    } elseif ($_REQUEST['action'] == "namemail") {
        namemail($_REQUEST['name'], $_REQUEST['email'], $_SESSION['userid']);
    }
} else {
    ?>
<script>alert("Вы не имеете доступа к этой странице, авторизуйтесь!");</script><?php 
    echo "<script>document.location.replace('/main');</script>";
}
<?php

if ($_REQUEST['type'] == "followup") {
    followup();
} elseif ($_REQUEST['type'] == "address") {
    address();
} elseif ($_REQUEST['type'] == "contacts") {
    contacts();
}
function contacts()
{
    echo <<<EOF

    nitobi.loadComponent('gridcontacts');

     function search(){
        var grid = nitobi.getGrid("gridcontacts");
        //reload grid data
\tgrid.dataBind();

    }

    //optional function to generate primary key value, ignore this function because we use autogen method
    function GetNewRecordID()
    {
        return 0;
    }

    //after grid html render properly, set focus on it. It is important when use choose particular cell but
    // immediately press search again. From screen we won't detect cell is selected infact from javascript
    // detect selected
Beispiel #3
0
function template($content_tile_name, $data)
{
    require_once dirname(__FILE__) . '/../tiles/' . $content_tile_name . '.php';
    before($content_tile_name);
    ?>
    <div id="header" class="right"><div class="right-inner">
        <?php 
    top();
    ?>
    
    </div></div>
    <div id="content" class="right"><div class="right-inner" style="float:_left">
        <?php 
    content($content_tile_name, $data);
    ?>
    </div></div>
    <div id="homelink" class="left"><div class="left-inner">
        <a href="./" title="на главную" id="home"></a>
    </div></div>
    <div id="timeleft" class="left"><div class="left-inner">
        <?php 
    timeleft($content_tile_name);
    ?>
    </div></div>
    <?php 
    if ('standing' != $content_tile_name && 'table' != $content_tile_name) {
        ?>
        <div id="control" class="left"><div class="left-inner">
            <?php 
        menu($content_tile_name);
        ?>
        </div></div>
    <?php 
    }
    ?>
    <div id="stuff" class="right"><div class="right-inner">
        <?php 
    stuff($content_tile_name);
    ?>
    </div></div>
    <div id="toolbar">
        <?php 
    toolbar($content_tile_name);
    ?>
    </div>
    <div id="support" class="left"><div class="left-inner">
        <?php 
    support();
    ?>
    </div></div>
    <div id="contacts" class="right"><div class="right-inner">
        <?php 
    contacts();
    ?>
    </div></div>
    <script type="text/javascript">
        (function($) {
            var
                    menuWidth   = $('#menu').width()
                ,   on          = false
                ;
            $(document.body).mousemove(function(e) {
                if ($(document.body).hasClass('noleft')) {
                    if (!on) {
                        defMargin(true);
                    }
                    if ($(e.target).closest('#control').size() && !on) {
                        on = true;
                        $('#control').animate(
                                { 'marginLeft': defMargin() + menuWidth + 'px' }
                            ,   200
                        );
                    } if (!$(e.target).closest('#control').size() && on) {
                        on = false;
                        $('#control').animate(
                                { 'marginLeft': defMargin() + 'px' }
                            ,   200
                        );
                    }
                } else {
                    defMargin(true);
                }
            });
        })(jQuery);
    </script>
<?php 
    after();
    die;
}
    //create a new directory and file in relation to the newly created resource
    $rs_path = get_resource_path($ref,true,"",true, $file_extension);

    //if the file move was successfull
    if(copy($tempdir.$filename, $rs_path)){
        //remove tmp file
        unlink($tempdir.$filename);
        set_time_limit(600);
        // if contact name fields are detected in $_POST
        if(array_key_exists("field_80",$_POST)){$creator = $_POST['field_80'];contacts($creator,$_POST,80);};
        if(array_key_exists("field_184",$_POST)){$creator = $_POST['field_184'];contacts($creator,$_POST, 184);};
        if(array_key_exists("field_171",$_POST)){$creator = $_POST['field_171'];contacts($creator, $_POST, 171);};
        if(array_key_exists("field_125",$_POST)){$creator = $_POST['field_125'];contacts($creator, $_POST, 125);};
        if(array_key_exists("field_177",$_POST)){$creator = $_POST['field_177'];contacts($creator, $_POST, 177);};
        if(array_key_exists("field_178",$_POST)){$creator = $_POST['field_178'];contacts($creator, $_POST, 178);};
        if(array_key_exists("field_180",$_POST)){$creator = $_POST['field_180'];contacts($creator, $_POST, 180);};

        //Update image sizes in database
        get_original_imagesize($ref,$rs_path,$file_extension);
        // Update disk usage
        update_disk_usage($ref);

        //Bug Fix for Videos not storing width and height values in the resource_dimensions table
        if($resource_type==3){
            $exiftool_fullpath = get_utility_path("exiftool");
            $command = $exiftool_fullpath . " -j -sourceImageWidth -sourceImageHeight ".escapeshellarg($rs_path)." 2>&1";
            $dimensions = run_command($command);
            $result=json_decode($dimensions);

            //if extraction was success
            if(isset($result[0]->SourceImageWidth) && isset($result[0]->SourceImageHeight)){
"
				     alt="<?php 
            echo htmlspecialchars($app['package']);
            ?>
" />
			</li>
		<?php 
        }
        ?>
		</ul>

		<?php 
        $contacts = array();
        if ($LOGIN_DATA['user_id']) {
            require dirname(__FILE__) . '/../include/contacts.php';
            $contacts = contacts($LOGIN_DATA['user_id']);
            $contact_requests = mysql_query("SELECT users.user_id,nickname FROM user_contact_requests,users WHERE user_contact_requests.user_id=users.user_id AND contact_id={$LOGIN_DATA['user_id']}") or die(mysql_error());
            if (mysql_num_rows($contact_requests) > 0) {
                echo '<h2>Contact Requests</h2><ul>';
                while ($contact_request = mysql_fetch_assoc($contact_requests)) {
                    ?>
				<li>
					<a href="<?php 
                    echo APPROOT;
                    ?>
users/<?php 
                    echo htmlspecialchars($contact_request['nickname']);
                    ?>
"><?php 
                    echo htmlspecialchars($contact_request['nickname']);
                    ?>