Pagina 1 di 4 1 2 3 ... ultimoultimo
Visualizzazione dei risultati da 1 a 10 su 34

Discussione: query con user loggato

  1. #1
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72

    query con user loggato

    Ciao a tutti,
    vi scrivo perchè ho un aiuto da chiedere.
    Premetto che sono un sistemista e non uno sviluppatore...
    Ho un sito in asp e devo recuperare dei dati presenti in un database sql con una query. Fin qui tutto bene...quello che mi serve è che I risultati siano relative all'utente loggato.
    Come faccio a mettere nella query questo parametro?
    Grazie in anticipo per l'aiuto.

  2. #2
    qualcosa del genere

    SQL="SELECT elenco_colonne FROM tabella WHERE colonna_utente='" & utente & "'"

    adattalo alla tua situazione

  3. #3
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72
    ciao optime e grazie della risposta.
    quindi basta che metto ""& userid & "" e il gioco è fatto? non vda nessuna parte?

  4. #4
    lukewas, cosa ne so? non sono davanti al tuo PC... ci hai dato così poche info che io ho potuto solo immaginare. La query esiste già e devi solo personalizzarla per l'utente loggato?

  5. #5
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72
    scusa...hai ragione, ma non so cosa ti può servire... si la query esiste già e devo solo personalizzarla per l'utente loggato...
    non so se ti può essere di aiuto ma nel codice della pagine vedo un sessionID ..

  6. #6
    postare un po' di codice....? cosa ne pensi? se tu fossi al posto mio ti sarebbe d'aiuto?

  7. #7
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72
    hai ragione... scusa




    <!DOCTYPE html>
    <html lang="en" >

    <head id="Head1"><meta charset="utf-8" /><meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=0" /><meta name="apple-mobile-web-app-capable" content="yes" /><meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" /><meta http-equiv="X-UA-Compatible" content="IE=Edge" />

    <script src="include/RoboHelp_CSH.js" type="text/javascript"></script>
    <script>
    var loc = window.location.href
    if (loc.indexOf("#/") != -1 && loc.indexOf("#!/") == -1 ){
    window.location.href = loc.replace("#/", "#!/");
    }
    </script>

    <script>
    var cloudTokenaspx = "";
    </script>
    <script>
    // Include angular-loader to allow modules to be loaded in any order.
    /*
    AngularJS v1.5.8
    (c) 2010-2016 Google, Inc. http://angularjs.org
    License: MIT
    */
    (function () {
    'use strict'; function d(b) { return function () { var a = arguments[0], e; e = "[" + (b ? b + ":" : "") + a + "] http://errors.angularjs.org/1.5.8/" + (b ? b + "/" : "") + a; for (a = 1; a < arguments.length; a++) { e = e + (1 == a ? "?" : "&") + "p" + (a - 1) + "="; var d = encodeURIComponent, c; c = arguments[a]; c = "function" == typeof c ? c.toString().replace(/ \{[\s\S]*$/, "") : "undefined" == typeof c ? "undefined" : "string" != typeof c ? JSON.stringify(c) : c; e += d(c) } return Error(e) } } (function (b) {
    function a(c, a, b) { return c[a] || (c[a] = b()) } var e = d("$injector"), n = d("ng");
    b = a(b, "angular", Object); b.$$minErr = b.$$minErr || d; return a(b, "module", function () {
    var c = {}; return function (b, d, h) {
    if ("hasOwnProperty" === b) throw n("badname", "module"); d && c.hasOwnProperty(b) && (c[b] = null); return a(c, b, function () {
    function c(a, b, d, e) { e || (e = f); return function () { e[d || "push"]([a, b, arguments]); return g } } function a(c, e) { return function (a, d) { d && "function" === typeof d && (d.$$moduleName = b); f.push([c, e, arguments]); return g } } if (!d) throw e("nomod", b); var f = [], k = [], l = [], m = c("$injector", "invoke", "push",
    k), g = {
    _invokeQueue: f, _configBlocks: k, _runBlocks: l, requires: d, name: b, provider: a("$provide", "provider"), factory: a("$provide", "factory"), service: a("$provide", "service"), value: c("$provide", "value"), constant: c("$provide", "constant", "unshift"), decorator: a("$provide", "decorator"), animation: a("$animateProvider", "register"), filter: a("$filterProvider", "register"), controller: a("$controllerProvider", "register"), directive: a("$compileProvider", "directive"), component: a("$compileProvider", "component"), config: m, run: function (a) {
    l.push(a);
    return this
    }
    }; h && m(h); return g
    })
    }
    })
    })(window)
    })(window);

    function LogOut() {

    try {
    __doPostBack('DoLogout');
    }
    catch (err) {
    //do nothing
    }

    }
    if (window.addEventListener) {
    window.addEventListener("message", receiveMessage, false);
    //window.addEventListener("onmessage", receiveMessage, false);
    }
    else if (window.attachEvent) {
    window.attachEvent("message", receiveMessage, false);
    //window.attachEvent("onmessage", receiveMessage, false);
    }

    function receiveMessage(event) {
    //alert('Message Received :' + event.data);
    cloudTokenaspx = event.data;

    var scope = angular.element(document).scope();
    scope.$apply();
    var scope = angular.element(document).scope();
    if (scope != null && scope != undefined) {
    scope.$apply();
    }
    //alert(event.data);
    // ...
    }

    function getCloudToken() {
    return cloudTokenaspx;
    }

    function CheckSessionStorageProblemAndOutputMessageIfNotSup ported(headerText,messageWhenSessionStorageIsInAcc essible) {
    try {
    var topbar='<header style="position: fixed;width: 100%;text-align: center;top: 10px;">'+headerText+'</header>'
    messageWhenSessionStorageIsInAccessible =topbar+ '<div style="height:100px;text-align:center;position: absolute;top:0;bottom: 0;left: 0;right: 0;margin: auto;">' + messageWhenSessionStorageIsInAccessible + '</div>';
    sessionStorage.setItem('SessionStorageTest', 'Test');
    sessionStorage.removeItem('SessionStorageTest');
    return true;
    }
    catch (err) {
    document.writeln(messageWhenSessionStorageIsInAcce ssible);
    return false;
    }
    }
    </script>

  8. #8
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72
    <script type="text/javascript">
    function SetSessionID(sessionid, siteGuid, companyId, facilityId, IsScreenSizeLimited, SessionTimeout, IsViewSite, ThemeId, cultureName, cultureCode, CID, company, pageReloadUrl, CanUserImpresonateAsCSR, CanUserImpresonateAsSubPartnerAdmin, ImpersonatorId, currImpersonationTypeAsString, deviceType, IsUserLoggedIn, ShowPricingToBuyer, ttId, ttpId, storefrontCatLangNeutralName, resourceTrackerEnabled, cultureDesc, xmlPunchOutInformationId, helpCode, softwareVersion, isPasswordExpired, checkoutMethodId, ociApprovalsEnabled, title, description, userSessionType, isReadOnlyMode, punchOutReturnUrl, IsComapnyBrandedURL, DisableCompanyName, authrequest, dutchTaxEnabled, userFavouritePrintshopId, SmartstoreCustomization, headerText, messageWhenSessionStorageIsInAccessible, wasUserRegisteredDuringLogin, showUnitPrice) {

    if (CheckSessionStorageProblemAndOutputMessageIfNotSu pported(headerText,messageWhenSessionStorageIsInAc cessible)) {
    //console.log('Setting !' + sessionid);
    sessionStorage.setItem('SessionID', sessionid);
    sessionStorage.setItem('SiteGUID', siteGuid);
    sessionStorage.setItem('CompanyId', companyId);
    sessionStorage.setItem('FacilityId', facilityId);
    sessionStorage.setItem('IsScreenSizeLimited', IsScreenSizeLimited.toString().toLowerCase());
    sessionStorage.setItem('SessionTimeout', SessionTimeout);
    sessionStorage.setItem('IsViewSite', IsViewSite);
    sessionStorage.setItem('SiteThemeId', ThemeId);
    sessionStorage.setItem('CultureName', cultureName);
    sessionStorage.setItem('CultureCode', cultureCode);
    sessionStorage.setItem('CultureDesc', cultureDesc);
    sessionStorage.setItem('HelpCode', helpCode);
    sessionStorage.setItem('CID', CID);
    sessionStorage.setItem('Company', company);
    //sessionStorage.setItem('PageReloadUrl', pageReloadUrl);
    sessionStorage.setItem('CanUserImpresonateAsCSR', CanUserImpresonateAsCSR);
    sessionStorage.setItem('CanUserImpresonateAsSubPar tnerAdmin', CanUserImpresonateAsSubPartnerAdmin);
    sessionStorage.setItem('currImpersonationTypeAsStr ing', currImpersonationTypeAsString);
    sessionStorage.setItem('ImpersonatorId', ImpersonatorId);
    if (IsUserLoggedIn == 'true' || IsUserLoggedIn == 'True')
    sessionStorage.setItem('IsUserLoggedIn', true);
    else sessionStorage.setItem('IsUserLoggedIn', false);

    if (isPasswordExpired == 'true' || isPasswordExpired == 'True')
    sessionStorage.setItem('HasUserPasswordExpired', true);
    else sessionStorage.setItem('HasUserPasswordExpired', false);

    console.log(isPasswordExpired);
    sessionStorage.setItem('ShowPricingToBuyer', ShowPricingToBuyer);
    sessionStorage.setItem('TTId', ttId);
    sessionStorage.setItem('TTPId', ttpId);
    sessionStorage.setItem('StorefrontCatLangNeutralNa me', storefrontCatLangNeutralName);
    sessionStorage.setItem('OCIApprovalsEnabled', ociApprovalsEnabled);
    sessionStorage.setItem('CheckoutMethodId', checkoutMethodId);

    // Jeevan: We need to pass the punchout information id
    sessionStorage.setItem('XmlPunchOutInformationId', xmlPunchOutInformationId);
    sessionStorage.setItem('UserSessionType', userSessionType);
    sessionStorage.setItem('IsReadOnlyMode', isReadOnlyMode);
    sessionStorage.setItem('PunchOutReturnUrl', punchOutReturnUrl);
    //Software version to version the javascript files.
    sessionStorage.setItem('SoftwareVersion', softwareVersion);
    /* var body = document.getElementsByTagName("body")[0];
    body.setAttribute("DeviceType", deviceType);*/
    var html = document.documentElement;
    html.setAttribute("DeviceType", deviceType);

    var pathArray = window.location.pathname.split('/');
    if (pathArray.length > 2) {
    var pathWithURL = window.location.protocol + "//" + window.location.hostname + "/" + pathArray[1] + "/";
    sessionStorage.setItem('BaseURL', pathWithURL);
    }
    sessionStorage.setItem('ResourceTrackerEnabled', resourceTrackerEnabled);

    sessionStorage.setItem('Title', title);
    sessionStorage.setItem('Description', description);
    sessionStorage.setItem('IsComapnyBrandedURL', IsComapnyBrandedURL);
    sessionStorage.setItem('DisableCompanyName', DisableCompanyName);
    sessionStorage.setItem('UserFavouritePrintshopId', userFavouritePrintshopId);
    sessionStorage.setItem('wasUserRegisteredDuringLog in', wasUserRegisteredDuringLogin);
    if (SmartstoreCustomization == 'true' || SmartstoreCustomization == 'True')
    sessionStorage.setItem('SmartstoreCustomization', true);
    else sessionStorage.setItem('SmartstoreCustomization', false);
    sessionStorage.setItem('authrequest', authrequest);
    sessionStorage.setItem('DutchTaxEnabled', dutchTaxEnabled);
    if (showUnitPrice == 'true' || showUnitPrice == 'True')
    sessionStorage.setItem('ShowUnitPrice', true);
    else sessionStorage.setItem('ShowUnitPrice', false);
    }
    }


    </script>
    <title>

  9. #9
    Utente di HTML.it
    Registrato dal
    Oct 2006
    Messaggi
    72
    Storefront
    </title><meta name="description" /><meta name="keywords" /><link href="App_Themes/[bb5de259-e0fe-4bfd-8c80-9a24f93f4e74]NAME-42b4e6fd-354e-45e8-9ec3-90652e724d4d/carousel.css?v=1701510784" rel="stylesheet" type="text/css" /><link href="App_Themes/[bb5de259-e0fe-4bfd-8c80-9a24f93f4e74]NAME-42b4e6fd-354e-45e8-9ec3-90652e724d4d/print.css?v=1701510784" rel="stylesheet" type="text/css" /><link href="App_Themes/[bb5de259-e0fe-4bfd-8c80-9a24f93f4e74]NAME-42b4e6fd-354e-45e8-9ec3-90652e724d4d/theme.css?v=1701510784" rel="stylesheet" type="text/css" /><script type="text/javascript" src="/DSF/include/json2.js"></script><script type="text/javascript" src="/DSF/include/jquery-3.1.1.min.js"></script><link rel="canonical" href="" /><link rel="shortcut icon" type="image/x-icon"></link><meta name="KEYWORDS" /></head>
    <body>
    <form method="post" action="./SmartStore.aspx?CultureName=en-GB&amp;SiteGUID=bb5de259-e0fe-4bfd-8c80-9a24f93f4e74&amp;random=0.8108453841948887" onsubmit="javascript:return WebForm_OnSubmit();" id="Form1" style="">
    <div class="aspNetHidden">
    <input type="hidden" name="__VIEWSTATEPERSISTER" id="__VIEWSTATEPERSISTER" value="System.Web.UI.HiddenFieldPageStatePersister " />
    <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="XTdA5JietMUjiXOkYq3XISCCvdfHuoskHoTpNEUb7xd nepeD3vuDKj1VpjQgymn7lydv0SZVBCyhLfdONsEgWpRtgKtGm qTXKDzxYBAFiEyZkpIgXRMLJV84IFxed2VdpRctMJoRioHqWEq nnsPDJiZr9e+EZUmiidFLvDi9+Lm4bu+JMf4bXeCGHzb4zG3Th tfJ+NW25QGxQ92MB9ArpNL02gUjfTO04j7Zp0TP86WpWEORzWM N/JwntKVXvTxyvl1c6uIw5l5blIxWdrIwYg==" />
    </div>


    <script src="/DSF/include/admin_globalfunctions.js?V=9.2.302.22357" type="text/javascript"></script>
    <script src="/DSF/include/Dev_JavaScriptTrace_off.js?V=9.2.302.22357" type="text/javascript"></script>
    <script src="/DSF/include/FlexTicketingPopup.js?V=9.2.302.22357" type="text/javascript"></script>
    <script src="/DSF/include/PopupAndScrollPosition.js?V=9.2.302.22357" type="text/javascript"></script>
    <script src="/DSF/include/OnlineContentFileUpload.js?V=9.2.302.22357" type="text/javascript"></script>
    <script src="/DSF/include/FlashPlayerDetectionKit.js?V=9.2.302.22357" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    SetSessionID('66069bb2-dc13-4b6c-8c83-e270be5c1df5','bb5de259-e0fe-4bfd-8c80-9a24f93f4e74', '9','1','False',120, 'False', '-1', 'en-GB', 'en-GB', '-1', 'MEP','','False','False','-1', 'None', 'Desktop', 'True', 'True', '0', '0', '/ViewCategory/storefront/SS_MEP_Storefront', 'False','English (United Kingdom)', '-1', 'en', '9.2.302.22357', 'False', '1','False', '', '', 'Web', 'False', '', 'True', 'True', '','False', '-1','False','Error!','Session Storage is not accessible on your browser. This could be because of private browsing. Please reload the page after disabling private browsing.', '','True');
    function KeepAspNetSessionAlive()
    {
    try
    {
    PageMethods.KeepAspNetSessionAlive(OnKeepAspNetSes sionAliveCompleted,OnKeepAspNetSessionAliveErred);
    }
    catch(err)
    {
    //do nothing -- error handling should be done with the "Completed" and "Erred" functions
    }
    }

    function OnKeepAspNetSessionAliveCompleted()
    {
    }

    function OnKeepAspNetSessionAliveErred()
    {
    }

    function KillAspNetSession()
    {
    try
    {
    PageMethods.KillAspNetSession(OnKillAspNetSessionC ompleted,OnKillAspNetSessionErred);
    }
    catch(err)
    {
    //do nothing -- error handling should be done with the "Completed" and "Erred" functions
    }
    }

    function OnKillAspNetSessionCompleted()
    {
    }

    function OnKillAspNetSessionErred()
    {
    }
    //]]>
    </script>

    <script src="/DSF/ScriptResource.axd?d=ZEpdSeJAYw2ryAWvcbsuIovJrZBqF ME7rOCgpxuHuQhfuTOwRdL1Z4_rteyjxqOl96woP3SoiJaQtCH PGoS39e2XkxUmNnt7gyB7MrfDZQ2ghzp8bAOsDP2Q2F6HU0piW OreLt4FQWbDqwURIar-EWoO0fnlJ7jZruJQNsd-coY1&amp;t=72e85ccd" type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[
    var PageMethods = function() {
    PageMethods.initializeBase(this);
    this._timeout = 0;
    this._userContext = null;
    this._succeeded = null;
    this._failed = null;
    }
    PageMethods.prototype = {
    _get_path:function() {
    var p = this.get_path();
    if (p) return p;
    else return PageMethods._staticInstance.get_path();},
    GetLocalizedString:function(key,succeededCallback, failedCallback, userContext) {
    return this._invoke(this._get_path(), 'GetLocalizedString',false,{key:key},succeededCall back,failedCallback,userContext); },
    KeepAspNetSessionAlive:function(succeededCallback, failedCallback, userContext) {
    return this._invoke(this._get_path(), 'KeepAspNetSessionAlive',false,{},succeededCallbac k,failedCallback,userContext); },
    KillAspNetSession:function(succeededCallback, failedCallback, userContext) {
    return this._invoke(this._get_path(), 'KillAspNetSession',false,{},succeededCallback,fai ledCallback,userContext); }}
    PageMethods.registerClass('PageMethods',Sys.Net.We bServiceProxy);
    PageMethods._staticInstance = new PageMethods();
    PageMethods.set_path = function(value) { PageMethods._staticInstance.set_path(value); }
    PageMethods.get_path = function() { return PageMethods._staticInstance.get_path(); }
    PageMethods.set_timeout = function(value) { PageMethods._staticInstance.set_timeout(value); }
    PageMethods.get_timeout = function() { return PageMethods._staticInstance.get_timeout(); }
    PageMethods.set_defaultUserContext = function(value) { PageMethods._staticInstance.set_defaultUserContext (value); }
    PageMethods.get_defaultUserContext = function() { return PageMethods._staticInstance.get_defaultUserContext (); }
    PageMethods.set_defaultSucceededCallback = function(value) { PageMethods._staticInstance.set_defaultSucceededCa llback(value); }
    PageMethods.get_defaultSucceededCallback = function() { return PageMethods._staticInstance.get_defaultSucceededCa llback(); }
    PageMethods.set_defaultFailedCallback = function(value) { PageMethods._staticInstance.set_defaultFailedCallb ack(value); }
    PageMethods.get_defaultFailedCallback = function() { return PageMethods._staticInstance.get_defaultFailedCallb ack(); }
    PageMethods.set_enableJsonp = function(value) { PageMethods._staticInstance.set_enableJsonp(value) ; }
    PageMethods.get_enableJsonp = function() { return PageMethods._staticInstance.get_enableJsonp(); }
    PageMethods.set_jsonpCallbackParameter = function(value) { PageMethods._staticInstance.set_jsonpCallbackParam eter(value); }
    PageMethods.get_jsonpCallbackParameter = function() { return PageMethods._staticInstance.get_jsonpCallbackParam eter(); }
    PageMethods.set_path("SmartStore.aspx");
    PageMethods.GetLocalizedString= function(key,onSuccess,onFailed,userContext) {PageMethods._staticInstance.GetLocalizedString(ke y,onSuccess,onFailed,userContext); }
    PageMethods.KeepAspNetSessionAlive= function(onSuccess,onFailed,userContext) {PageMethods._staticInstance.KeepAspNetSessionAliv e(onSuccess,onFailed,userContext); }
    PageMethods.KillAspNetSession= function(onSuccess,onFailed,userContext) {PageMethods._staticInstance.KillAspNetSession(onS uccess,onFailed,userContext); }
    function WebForm_OnSubmit() {
    if (document.getElementById('ENDPAGE_MARKER_DSF') == null) return false;
    return true;
    }
    //]]>
    </script>

    <div class="aspNetHidden">

    <input type="hidden" name="__VIEWSTATEGENERATOR" id="__VIEWSTATEGENERATOR" value="A162F59A" />
    <input type="hidden" name="__VIEWSTATEENCRYPTED" id="__VIEWSTATEENCRYPTED" value="" />
    </div>


    <!-- Flex popup content holder start-->
    <div>

    <input type="hidden" name="HidRedirectCompleted" id="HidRedirectCompleted" />
    <input type="hidden" name="HidRedirectClosed" id="HidRedirectClosed" />
    <input type="hidden" name="HidSaveJob" id="HidSaveJob" />
    <input type="hidden" name="HidCheckoutMethodId" id="HidCheckoutMethodId" value="1" />
    </div>
    <!-- Flex popup content holder end-->

    <input type="hidden" name="ENDPAGE_MARKER_DSF" id="ENDPAGE_MARKER_DSF" />

    <script type="text/javascript">
    //<![CDATA[
    InitHiddenId('HidRedirectCompleted');InitHiddenIdF orClose('HidRedirectClosed');InitHiddenIdForSaveJo b('HidSaveJob');InitProgressControl('FlexTicketing Div','FlexTicketingIFrame');InitBrowserAndVersionD etails();//]]>
    </script>
    </form>
    <div ng-view resize class="wrapper">
    </div>

    <script type="text/javascript">
    var require = {
    baseUrl: '',
    waitSeconds: 120,
    //either this if you want it on all require.js requests
    urlArgs: 'v=' + sessionStorage.getItem('SoftwareVersion'),

    //or this for specific files:
    paths: {
    'main': 'main'
    }
    };
    </script>
    <script type="text/javascript">
    var mainjsPath = ''
    var requirejsPath = ''

    mainjsPath = 'responsiveui/compiledcode/BuyerPages/js/main';
    requirejsPath = 'responsiveui/compiledcode/lib/require/require-min.js';
    sessionStorage.setItem("IsDebug", false);

    var script = document.createElement('script');

    script.setAttribute('data-main', mainjsPath);
    script.setAttribute('src', requirejsPath + '?v=' + sessionStorage.getItem('SoftwareVersion'));

    document.head.appendChild(script);
    </script>
    <!--[if lte IE 8]> <script src="responsiveui/lib/angular/ie-shiv.js"></script><![endif]-->
    </body>
    </html>

  10. #10
    da un eccesso all'altro comunque, non vedo interrogazioni, non vedo connessioni a db... sicuro che sia la pagina giusta?

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved.