Can we get a list of shortcuts going on here...maybe get this stickied...I'll start off with the one for contacts...
23#"\Windows\poutlook.exe" contacts
Please move if this is not in the right section
Links for settings:
Settings>Personal>Password>Password = 20#ctlpnl cplmain.cpl,1
Settings>Personal>Password>Hint = 22#ctlpnl cplmain.cpl,1,1
Settings>Personal>Owner Information>Identification = 20#ctlpnl cplmain.cpl,2
Settings>Personal>Owner Information>Notes = 22#ctlpnl cplmain.cpl,2,1
Settings>Personal>Owner Information>Options = 22#ctlpnl cplmain.cpl,2,2
Settings>System>Power>Main = 20#ctlpnl cplmain.cpl,3
Settings>System>Memory>Main = 20#ctlpnl cplmain.cpl,4
Settings>System>Memory>Storage Card = 22#ctlpnl cplmain.cpl,4,1
Settings>System>Memory>Running Programs = 22#ctlpnl cplmain.cpl,4,2
Settings>System>About>Version = 20#ctlpnl cplmain.cpl,5
Settings>System>About>Device ID = 22#ctlpnl cplmain.cpl,5,1
Settings>System>About>Copyrights = 22#ctlpnl cplmain.cpl,5,2
Settings>System>Backlight>Brightness = 20#ctlpnl cplmain.cpl,6
Settings>System>Backlight>Battery power= 20#ctlpnl cplmain.cpl,6,1
Settings>System>Backlight>External power = 20#ctlpnl cplmain.cpl,6,2
Settings>System>Screen>General = 20#ctlpnl cplmain.cpl,7
Settings>System>Screen>Clear Type = 22#ctlpnl cplmain.cpl,7,1
Settings>System>Screen>Text Size = 22#ctlpnl cplmain.cpl,7,2
Settings>Personal>Input>Input Method = 20#ctlpnl cplmain.cpl,8
Settings>Personal>Input>Word Completion = 22#ctlpnl cplmain.cpl,8,1
Settings>Personal>Input>Options = 22#ctlpnl cplmain.cpl,8,2
Settings>Personal>Sounds & Notifications>Sounds = 20#ctlpnl cplmain.cpl,9
Settings>Personal>Sounds & Notifications>Notifications = 22#ctlpnl cplmain.cpl,9,1
Settings>System>Remove Programs = 21#ctlpnl cplmain.cpl,10
Settings>Personal>Menus>Start Menu = 21#ctlpnl cplmain.cpl,11
Settings>Personal>Menus>New Menu = 23#ctlpnl cplmain.cpl,11,1
Settings>Personal>Buttons>Program Buttons = 21#ctlpnl cplmain.cpl,12
Settings>Personal>Buttons>Up/Down Controls = 23#ctlpnl cplmain.cpl,12,1
Settings>Personal>Today>Appearance = 21#ctlpnl cplmain.cpl,13
Settings>Personal>Today>Items = 23#ctlpnl cplmain.cpl,13,1
Settings>Connections>Beam = 21#ctlpnl cplmain.cpl,15
Settings>System>Clock & Alarms>Time = 21#ctlpnl cplmain.cpl,16
Settings>System>Clock & Alarms>Alarms = 23#ctlpnl cplmain.cpl,16,2
Settings>Connections>Network Cards = 21#ctlpnl cplmain.cpl,17
Settings>System>Regional Settings>Region = 21#ctlpnl cplmain.cpl,18
Settings>System>Regional Settings>Number = 23#ctlpnl cplmain.cpl,18,1
Settings>System>Regional Settings>Currency = 23#ctlpnl cplmain.cpl,18,2
Settings>System>Regional Settings>Time = 23#ctlpnl cplmain.cpl,18,3
Settings>System>Regional Settings>Date = 23#ctlpnl cplmain.cpl,18,4
Settings>Connections>Connections>Task = 21#ctlpnl cplmain.cpl,19
Settings>Connections>Connection>Advanced = 23#ctlpnl cplmain.cpl,19,1
Settings>Personal>Phone>Phone = 21#ctlpnl cplmain.cpl,20
Settings>Personal>Phone>Services = 23#ctlpnl cplmain.cpl,20,1
Settings>Personal>Phone>Network = 23#ctlpnl cplmain.cpl,20,2
Settings>Personal>Phone>More = 23#ctlpnl cplmain.cpl,20,3
Settings>System>Certificates>Personal = 21#ctlpnl cplmain.cpl,22
Settings>System>Certificates>Root = 23#ctlpnl cplmain.cpl,22,1
Settings>Connections>Bluetooth>Mode = 21#ctlpnl cplmain.cpl,23
Settings>Connections>Bluetooth>Devices = 23#ctlpnl cplmain.cpl,23,1
Calendar agenda view
21#:MSCALENDAR -va?outres.dll,-100002
Calendar day view
21#:MSCALENDAR -vd?outres.dll,-100002
Calendar month view
21#:MSCALENDAR -vm?outres.dll,-100002
Calendar week view
21#:MSCALENDAR -vw?outres.dll,-100002
Calendar year view
21#:MSCALENDAR -vy?outres.dll,-100002
(Edit: Calendar must be already running in the background for these to work)
MMS
20#"\Windows\tmail.exe"-service "MMS"
email
20#"\Windows\tmail.exe"-service "ActiveSync"
SMS
20#"\Windows\tmail.exe"-service "SMS"
sms open inbox
20#"\Windows\tmail.exe" -service "SMS" -open "inbox"
straight away compose
20#"\windows\tmail.exe" -service "SMS" -to ""
Thanks folks, nice thread, been looking for some of these.
How do you edit the shortcuts?
daverage said:
How do you edit the shortcuts?
Click to expand...
Click to collapse
You can use notes on your PPC or Notepad on your desktop.
Maknificent said:
Can we get a list of shortcuts going on here...maybe get this stickied...I'll start off with the one for contacts...
23#"\Windows\poutlook.exe" contacts
Please move if this is not in the right section
Click to expand...
Click to collapse
Gives me a folder icon?
blazingwolf said:
You can use notes on your PPC or Notepad on your desktop.
Click to expand...
Click to collapse
Thanks!! That is perfect
Sorry but ...
This is useful for...?
Thanks in advance!!!
mikhe69 said:
Sorry but ...
This is useful for...?
Thanks in advance!!!
Click to expand...
Click to collapse
...
This is very usefull if you want to create, for intance, quick "send message to..." and stuf like that daaah
In conjuntions with QuickMenu and programs like that, this is most usefull
Anyone has shortcut for phone to <number>?!?!?
this one give me a prompt to confime....
20#"\Windows\cprog.exe"-url tel:<number>
...
Ok- Ive tried all these to get a lnk for email to contact to work for NewMenu..
20#"\windows\tmail.exe" -service "activesync" -to "xxxxx" xxxxx=contact
Will open outlook inbox. If I leave -service off it will ask me for the type of messaging service to select then it inserts the contact correctly. Thats the closest Ive got it to work.
23#"\windows\poutlook.exe" -service "activesync" -to "xxxxx" xxxxx=contact
Any ideas??? I'm pulling my hair out on this one and dont have much left.
These should be posted to WIKI
This is very useful for some of the new themes....ie the iPhone theme, or both of the Cube themes that have been created. Thanks to all who have contributed.
Tried the wiki... keep getting this error...
lib/WikiDB.php:468: Fatal[0]: <br />/var/www/phpwiki/lib/WikiDB.php:468: : Assertion failed <br />
does anyone know the file for launching the programs folder like in the start menu? I'd like to map that to one of my softkeys. i have the HTC home plugin which has a launch programs folder icon that works, but cant find the lnk from that anywhere either. many thanks for the help and great idea for a thread.
You can get the folderview.exe from HTC Home Plugin. That .exe opens up Programs folder from start menu
dferreira said:
You can get the folderview.exe from HTC Home Plugin. That .exe opens up Programs folder from start menu
Click to expand...
Click to collapse
that was no luck, unfortunately. I have WA3 installed, which must have done something, because when running folderview.exe it is all blank with 1 folder- programs, and when I click that i get something entirely blank. the programs launcher button on the home plugin works perfectly though, blunders wonders.
----------------
Now playing: Pink Floyd - Hey You
via FoxyTunes
how do you add icon images for these shortcut files/
Shortcut Creator
bowlopho said:
how do you add icon images for these shortcut files/
Click to expand...
Click to collapse
Shortcut Creator could be interesting for you....
another easy option to create a shortcut is QuickMenu (nice tool ):
When you select QuickMenu > Execute you can run a command including an parameter and also create a shortcut:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
cheers
Related
Hi there,
I'm having a big issue, when trying to remove an XElement from an XML file created in IsolatedStorage.
--------------------------------------------------------------------------------------------
Code to CREATE the XML file
Dim File_to_Create As String = "Tracks.xml"
Dim file As XDocument = <?xml version="1.0" encoding="UTF-8"?>
<dataroot xmlnsd="urn:schemas-microsoft-comfficedata" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Cartridges.xsd" generated="2010-11-23T14:26:55">
<Carts>
<CART_NAME>First</CART_NAME>
<CART_COLOR>White</CART_COLOR>
</Carts>
<Carts>
<CART_NAME>Second</CART_NAME>
<CART_COLOR>Black</CART_COLOR>
</Carts>
</dataroot>
Dim isoStore As IsolatedStorageFile = IsolatedStorageFile.GetUserStoreForApplication()
Try
If isoStore.FileExists(File_to_Create) Then
MessageBox.Show(File_to_Create + " TRUE")
Else
MessageBox.Show(File_to_Create + " FALSE")
Dim oStream As New IsolatedStorageFileStream(File_to_Create, FileMode.Create, isoStore)
Dim writer As New StreamWriter(oStream)
writer.WriteLine(file)
writer.Close()
MessageBox.Show("OK")
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
'open selected file
Dim isoStream As IsolatedStorageFileStream
isoStream = New IsolatedStorageFileStream(File_to_Create, System.IO.FileMode.Open, System.IO.FileAccess.Read, isoStore)
Dim XML_File As XDocument = XDocument.Load(isoStream)
Dim Cart_Query As System.Collections.IEnumerable = From query In XML_File.Descendants("Carts") Order By _
CStr(query.Element("CART_NAME")) Descending, CStr(query.Element("CART_NAME"))
Select New Class_Cartridge_Data With {.Cart_Name = CStr(query.Element("CART_NAME")), _
.Cart_Color = CStr(query.Element("CART_COLOR"))}
Me.ListBox_Cartridges.ItemsSource = Cart_Query
isoStore.Dispose()
isoStream.Close()
End Try
--------------------------------------------------------------------------------------------
Code to ADD / EDIT XElement
Dim File_to_Create As String = "Tracks.xml"
Dim XML_IsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication()
' Check that the file exists if not create it
If Not (XML_IsolatedStorage.FileExists(File_to_Create)) Then
Return
End If
Dim XML_StreamReader As New StreamReader(XML_IsolatedStorage.OpenFile(File_to_Create, FileMode.Open, FileAccess.Read))
Dim XML_Document As XDocument = XDocument.Parse(XML_StreamReader.ReadToEnd())
XML_StreamReader.Close()
' Update the element if it exist or create it if it doesn't
Dim XML_XElement As XElement = XML_Document.Descendants("Carts").Where(Function(c) c.Element("CART_NAME").Value.Equals("First")).FirstOrDefault()
If XML_XElement IsNot Nothing Then
XML_XElement.SetElementValue("CART_NAME", "Third")
Else
' Add new
Dim newProgress As New XElement("Cartridges", New XElement("CART_NAME", "Fourth"), New XElement("CART_COLOR", "Blue"))
Dim rootNode As XElement = XML_Document.Root
rootNode.Add(newProgress)
End If
Using XML_StreamWriter As New StreamWriter(XML_IsolatedStorage.OpenFile(File_to_Create, FileMode.Open, FileAccess.Write))
XML_StreamWriter.Write(XML_Document.ToString())
XML_StreamWriter.Close()
End Using
--------------------------------------------------------------------------------------------
Now my issue and request for some help!
If I use
XML_XElement.Remove
then the following exception is raised whenever I try to "refresh" the bounded ListBox
System.Xml.XmlException was unhandled
LineNumber=37
LinePosition=12
Message=Data at the root level is invalid. Line 37, position 12.
SourceUri=""
StackTrace:
at System.Xml.XmlTextReaderImpl.Throw(Exception e)
at System.Xml.XmlTextReaderImpl.Throw(Int32 res, String resString, String[] args)
at System.Xml.XmlTextReaderImpl.Throw(Int32 res, String resString)
at System.Xml.XmlTextReaderImpl.ParseRootLevelWhitespace()
at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
at System.Xml.XmlTextReaderImpl.Read()
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r)
at System.Xml.Linq.XContainer.ReadContentFrom(XmlReader r, LoadOptions o)
at System.Xml.Linq.XDocument.Load(XmlReader reader, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream, LoadOptions options)
at System.Xml.Linq.XDocument.Load(Stream stream)
at ListBox_Data_from_XML_LINQ.MainPage.Button_Create_XML_Click(Object sender, RoutedEventArgs e)
at System.Windows.Controls.Primitives.ButtonBase.OnClick()
at System.Windows.Controls.Button.OnClick()
at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
at System.Windows.Controls.Control.OnMouseLeftButtonUp(Control ctrl, EventArgs e)
at MS.Internal.JoltHelper.FireEvent(IntPtr unmanagedObj, IntPtr unmanagedObjArgs, Int32 argsTypeIndex, String eventName)
InnerException:
--------------------------------------------------------------------------------------------
In short, I can add or edit, but cannot DELETE an XElement...
Any ideas?
Thanks in advance!
Can you post the code you are using for XElement.Remove and use code tags so the formatting is right. Its the # button on the post toolbar.
Ren13B said:
Can you post the code you are using for XElement.Remove and use code tags so the formatting is right. Its the # button on the post toolbar.
Click to expand...
Click to collapse
Well, I did nothing special, just the XML_Element.remove, instead of adding a new xelement.
Then the error raises whenever I try to reopen the XML file.
My point is, how can I delete an specific xelement?
As far as I know, the following code should work
Code:
Dim XML_XElement As XElement = XML_Document.Descendants("Carts").Where(Function(c ) c.Element("CART_NAME").Value.Equals("First")).Firs tOrDefault()
If XML_XElement IsNot Nothing Then
XML_XElement.SetElementValue("CART_NAME", "Third")
Else
' remove the selected record
XML_XElement.Remove
End If
Honestly I don't know if the foregoing code is correct or if the issue is related to how WP7 handles the removal thus corrupting the original file.
Please let me know if you need anything else.
Any help is very appreciated!
PS: Thanks for the other replies, helped a lot!
Here's how I did it in c#. My xml file is very different than yours so the query will be different but the important parts are where you load and close the file streams and then write.
Code:
//Get users private store info
IsolatedStorageFile isoStore = IsolatedStorageFile.GetUserStoreForApplication();
IsolatedStorageFileStream isoStream;
//open selected file
isoStream = new IsolatedStorageFileStream(list, System.IO.FileMode.Open, System.IO.FileAccess.Read, isoStore);
XDocument xml = XDocument.Load(isoStream);
isoStream.Close();
//Find section
XElement sectionElement = xml.Descendants("section").Where(c => c.Attribute("name").Value.Equals(groupn)).FirstOrDefault();
//Find item and remove it
sectionElement.Elements("setting").Where(c => c.Attribute("name").Value.Equals(litem)).FirstOrDefault().Remove();
isoStream.Close(); //Seems unnecessary but it's needed.
//Write xml file
isoStream = new IsolatedStorageFileStream(list, FileMode.Create, FileAccess.Write, isoStore);
xml.Save(isoStream);
isoStream.Close();
Thanks again for your help, greatly appreciated.
However I'm still getting the same error.
Sorry for asking, but are you getting any errors when deleting in WP7 ?
My knowledge on XML is extremely new and I'm sure that I'm making some mistakes somewhere...
But so far, I cannot get past the same exception.
Seems that the XML gots "corrupted" after the delete operation.
On the other hand, if is not too much to ask for, using my current code, how will handle the delete of the selected record?
Thanks!
I have no problem at all removing elements in c#. I don't have vb support even installed right now. If you think it's a bug you should post on the forums at http://forums.create.msdn.com/forums/98.aspx
Ren13B said:
I have no problem at all removing elements in c#. I don't have vb support even installed right now. If you think it's a bug you should post on the forums at http://forums.create.msdn.com/forums/98.aspx
Click to expand...
Click to collapse
Problem is my country is not listed so I cannot register...
Here is the C# version of my current code for adding/editing
Code:
public static void ADD_XML_Record()
{
string File_to_Create = "Tracks.xml";
var XML_IsolatedStorage = IsolatedStorageFile.GetUserStoreForApplication();
// Check that the file exists if not create it
if (! (XML_IsolatedStorage.FileExists(File_to_Create)))
{
return;
}
StreamReader XML_StreamReader = new StreamReader(XML_IsolatedStorage.OpenFile(File_to_Create, FileMode.Open, FileAccess.Read));
XDocument XML_Document = XDocument.Parse(XML_StreamReader.ReadToEnd());
XML_StreamReader.Close();
// Update the element if it exist or create it if it doesn't
XElement XML_XElement = XML_Document.Descendants("Carts").Where((c) => c.Element["CART_NAME"].Value.Equals("dd")).FirstOrDefault();
if (XML_XElement != null)
{
XML_XElement.SetElementValue("CART_NAME", "bbbbb");
}
else
{
// Add new
XElement newProgress = new XElement("Carts", new XElement("CART_NAME", "dd"), new XElement("CART_COLOR", "ff"));
XElement rootNode = XML_Document.Root;
rootNode.Add(newProgress);
}
using (StreamWriter XML_StreamWriter = new StreamWriter(XML_IsolatedStorage.OpenFile(File_to_Create, FileMode.Open, FileAccess.Write)))
{
XML_StreamWriter.Write(XML_Document.ToString());
XML_StreamWriter.Close();
}
}
I tried your code but I'm having a bad time making it to work.
If not a big deal, please could you tell me how to modify it ?
I mean, if a record is found, instead of editing, to remove it?
Honestly I'm stuck and any help is more than apprecisted!
Ren13B said:
I have no problem at all removing elements in c#. I don't have vb support even installed right now. If you think it's a bug you should post on the forums at http://forums.create.msdn.com/forums/98.aspx
Click to expand...
Click to collapse
Ren,
Just to say thank you for your last code. I made a little mod and now it works ok!
Thanks a lot for helping me out!
I can't work out what the code is in .net cf is ...
Example: I want to press a button in my app that brings up say settings or task manager...??
Can any one help...?
Check out my thread considering shortcuts (*.lnk)
Create shortcuts to Feature Settings and Applications manually
Hope this helps,
Seanx
dont know where i got them from
Available parameters for tmail.exe (depending on the service used) are- "tmail.exe" -new ""
"tmail.exe" -service ""
"tmail.exe" -to ""
"tmail.exe" -subject ""
"tmail.exe" -Body ""
"tmail.exe" -attach ""
"tmail.exe" -open "inbox"
"tmail.exe" -sync
or combinations of all such as-
"tmail.exe" -to "[email protected]" -subject "Photos" -Message "Hi, here is the picture" -attach "\my documents\my pictures\1.jpg"
---------------------------------------------------------------------------------------
Links for settings:
Settings>Personal>Password>Password = 20#ctlpnl cplmain.cpl,1
Settings>Personal>Password>Hint = 22#ctlpnl cplmain.cpl,1,1
Settings>Personal>Owner Information>Identification = 20#ctlpnl cplmain.cpl,2
Settings>Personal>Owner Information>Notes = 22#ctlpnl cplmain.cpl,2,1
Settings>Personal>Owner Information>Options = 22#ctlpnl cplmain.cpl,2,2
Settings>System>Power>Main = 20#ctlpnl cplmain.cpl,3
Settings>System>Memory>Main = 20#ctlpnl cplmain.cpl,4
Settings>System>Memory>Storage Card = 22#ctlpnl cplmain.cpl,4,1
Settings>System>Memory>Running Programs = 22#ctlpnl cplmain.cpl,4,2
Settings>System>About>Version = 20#ctlpnl cplmain.cpl,5
Settings>System>About>Device ID = 22#ctlpnl cplmain.cpl,5,1
Settings>System>About>Copyrights = 22#ctlpnl cplmain.cpl,5,2
Settings>System>Backlight>Brightness = 20#ctlpnl cplmain.cpl,6
Settings>System>Backlight>Battery power= 20#ctlpnl cplmain.cpl,6,1
Settings>System>Backlight>External power = 20#ctlpnl cplmain.cpl,6,2
Settings>System>Screen>General = 20#ctlpnl cplmain.cpl,7
Settings>System>Screen>Clear Type = 22#ctlpnl cplmain.cpl,7,1
Settings>System>Screen>Text Size = 22#ctlpnl cplmain.cpl,7,2
Settings>Personal>Input>Input Method = 20#ctlpnl cplmain.cpl,8
Settings>Personal>Input>Word Completion = 22#ctlpnl cplmain.cpl,8,1
Settings>Personal>Input>Options = 22#ctlpnl cplmain.cpl,8,2
Settings>Personal>Sounds & Notifications>Sounds = 20#ctlpnl cplmain.cpl,9
Settings>Personal>Sounds & Notifications>Notifications = 22#ctlpnl cplmain.cpl,9,1
Settings>System>Remove Programs = 21#ctlpnl cplmain.cpl,10
Settings>Personal>Menus>Start Menu = 21#ctlpnl cplmain.cpl,11
Settings>Personal>Menus>New Menu = 23#ctlpnl cplmain.cpl,11,1
Settings>Personal>Buttons>Program Buttons = 21#ctlpnl cplmain.cpl,12
Settings>Personal>Buttons>Up/Down Controls = 23#ctlpnl cplmain.cpl,12,1
Settings>Personal>Today>Appearance = 21#ctlpnl cplmain.cpl,13
Settings>Personal>Today>Items = 23#ctlpnl cplmain.cpl,13,1
Settings>Connections>Beam = 21#ctlpnl cplmain.cpl,15
Settings>System>Clock & Alarms>Time = 21#ctlpnl cplmain.cpl,16
Settings>System>Clock & Alarms>Alarms = 23#ctlpnl cplmain.cpl,16,2
Settings>Connections>Network Cards = 21#ctlpnl cplmain.cpl,17
Settings>System>Regional Settings>Region = 21#ctlpnl cplmain.cpl,18
Settings>System>Regional Settings>Number = 23#ctlpnl cplmain.cpl,18,1
Settings>System>Regional Settings>Currency = 23#ctlpnl cplmain.cpl,18,2
Settings>System>Regional Settings>Time = 23#ctlpnl cplmain.cpl,18,3
Settings>System>Regional Settings>Date = 23#ctlpnl cplmain.cpl,18,4
Settings>Connections>Connections>Task = 21#ctlpnl cplmain.cpl,19
Settings>Connections>Connection>Advanced = 23#ctlpnl cplmain.cpl,19,1
Settings>Personal>Phone>Phone = 21#ctlpnl cplmain.cpl,20
Settings>Personal>Phone>Services = 23#ctlpnl cplmain.cpl,20,1
Settings>Personal>Phone>Network = 23#ctlpnl cplmain.cpl,20,2
Settings>Personal>Phone>More = 23#ctlpnl cplmain.cpl,20,3
Settings>System>Certificates>Personal = 21#ctlpnl cplmain.cpl,22
Settings>System>Certificates>Root = 23#ctlpnl cplmain.cpl,22,1
Settings>Connections>Bluetooth>Mode = 21#ctlpnl cplmain.cpl,23
Settings>Connections>Bluetooth>Devices = 23#ctlpnl cplmain.cpl,23,1
---------------------------------------------------------------------------------------
Calendar agenda view 21#:MSCALENDAR -va?outres.dll,-100002
Calendar day view 21#:MSCALENDAR -vd?outres.dll,-100002
Calendar month view 21#:MSCALENDAR -vm?outres.dll,-100002
Calendar week view 21#:MSCALENDAR -vw?outres.dll,-100002
Calendar year view 21#:MSCALENDAR -vy?outres.dll,-100002
Calendar must be already running in the background for these to work
---------------------------------------------------------------------------------------
New Task: "poutlook.exe" tasks -new
New Note: "notes.exe" -n
New Contact: "poutlook.exe" contacts -new
New Appointment: "poutlook.exe" calendar -new
---------------------------------------------------------------------------------------
To Dial a number: "\windows\cprog.exe" -n -url tel:+1234567890
---------------------------------------------------------------------------------------
camera
"\windows\camera.exe" -i =photo mode
"\windows\camera.exe" -v =video mode
"\windows\camera.exe" -p =contact photo mode
"\windows\camera.exe" -m =mms video mode
"\Windows\HTCAlbum.exe" -mode:camera -type:image
"\Windows\HTCAlbum.exe" -mode:camera -type:video
"\windows\camera.exe" -t =picture theme mode
"\windows\camera.exe" -b =burst mode
"\windows\camera.exe" -g =GPS photo mode
"\windows\camera.exe" -s =Sport mode
So if you, or other users, need/want buttons to press to log off, reboot or shutdown their PC's from the start screen, this simple VBS script will make those for you in a quick run:
Save as a .vbs file and double click.
Code:
set WshShell = WScript.CreateObject("WScript.Shell")
strStartMenu = WshShell.SpecialFolders("StartMenu")
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-s -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"
oShellLink.Description = "Shutdown Computer (Power Off)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-l"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"
oShellLink.Description = "Log Off (Switch User)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-r -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"
oShellLink.Description = "Restart Computer (Reboot)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
Wscript.Echo "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
Enjoy!
Tnx im gonna try and report if it worked
Sent from my LG-P970 using xda premium
It works
Sent from my LG-P970 using xda premium
I tried this and it works. Thanks.
Sent from my HERO200 using xda app-developers app
Great Job, thanks, this will make it a bit more intuitive Here is a photo of the icons:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Ahh my friend always wondered how can they turn off my Win8 laptop lol. This might be handy. Thanks!
(I always told my friend to close the lid to hibernate my laptop lol)
Sent from my GT-I9100 using Tapatalk 2
KcLKcL said:
Ahh my friend always wondered how can they turn off my Win8 laptop lol. This might be handy. Thanks!
(I always told my friend to close the lid to hibernate my laptop lol)
Sent from my GT-I9100 using Tapatalk 2
Click to expand...
Click to collapse
So you haven't seen anything lol
Go to the right corner at the bottom, then go to settings and the power bottom will be right there. Most apps has settings and everytime you go there, different settings will be shown for the specific app :fingers-crossed:
CRDeveloper said:
So you haven't seen anything lol
Go to the right corner at the bottom, then go to settings and the power bottom will be right there. Most apps has settings and everytime you go there, different settings will be shown for the specific app :fingers-crossed:
Click to expand...
Click to collapse
Lol I do know how to shutdown from the settings menu..
Sent from my GT-I9100 using Tapatalk 2
Great job thanks, is there any way to chnage the restart icon to a higher image version ? seems lower rez than the other 2
---------- Post added at 01:52 PM ---------- Previous post was at 01:52 PM ----------
Great job thanks, is there any way to change the restart icon to a higher image version ? seems lower rez than the other 2
Can you guide how to save as .vbf file. I don't know how to apply your script. Please guide me as I'm a noob.
Thanks in advance, bro.
PS: I'm using window 8 with notebook.
kyawswaraung said:
Can you guide how to save as .vbf file. I don't know how to apply your script. Please guide me as I'm a noob.
Thanks in advance, bro.
PS: I'm using window 8 with notebook.
Click to expand...
Click to collapse
you can found file here http://forum.xda-developers.com/showpost.php?p=33770311&postcount=206
or you have to copy and paste the code in your note pad and save it as .vbs file and then double click on it :good:
awesome......... works as said
Nice , Very Flexible
Talderon said:
So if you, or other users, need/want buttons to press to log off, reboot or shutdown their PC's from the start screen, this simple VBS script will make those for you in a quick run:
Save as a .vbs file and double click.
Code:
set WshShell = WScript.CreateObject("WScript.Shell")
strStartMenu = WshShell.SpecialFolders("StartMenu")
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-s -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"
oShellLink.Description = "Shutdown Computer (Power Off)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-l"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"
oShellLink.Description = "Log Off (Switch User)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-r -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"
oShellLink.Description = "Restart Computer (Reboot)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
Wscript.Echo "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
Enjoy!
Click to expand...
Click to collapse
worx .....
thx
:laugh::laugh::laugh::laugh:
Thnks !
Thanks a lot !! Worked
Talderon said:
So if you, or other users, need/want buttons to press to log off, reboot or shutdown their PC's from the start screen, this simple VBS script will make those for you in a quick run:
Save as a .vbs file and double click.
Code:
set WshShell = WScript.CreateObject("WScript.Shell")
strStartMenu = WshShell.SpecialFolders("StartMenu")
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Shutdown.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-s -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,27"
oShellLink.Description = "Shutdown Computer (Power Off)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Log Off.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-l"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,44"
oShellLink.Description = "Log Off (Switch User)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
set oShellLink = WshShell.CreateShortcut(strStartMenu & "\Restart.lnk")
oShellLink.TargetPath = "%systemroot%\System32\shutdown.exe"
oShellLink.Arguments = "-r -t 0"
oShellLink.WindowStyle = 1
oShellLink.IconLocation = "%systemroot%\System32\shell32.dll,176"
oShellLink.Description = "Restart Computer (Reboot)"
oShellLink.WorkingDirectory = "%systemroot%\System32\"
oShellLink.Save
Set oShellLink = Nothing
Wscript.Echo "Shutdown, Restart and Log Off buttons have been created. You can now pin them to the Start Screen of your Windows 8 computer (if they are not already there)."
Enjoy!
Click to expand...
Click to collapse
MS is offering a build-in sollution. For more information see: http://gallery.technet.microsoft.com/scriptcenter/Create-a-ShutdownRestartLog-37c8111d
Hi friends.
There is simple tutorial. We use WP7 DllIprort Project, or another native Dlls, to enable our managed (mostly Silverlight) applications to do any system calling. But, debuging of hybrid applications is difficult. May be, somebody is able to make publicly usable source to use standard Visual Studio way to test and debug native Dlls, but Ultrashot and others have no time, they have important things to do.
Then, I prepared simple library, which export native TRACE macro and managed wrapper too.
Using:
1. Copy all content from attachment NativeDebugTraceVS2008 directory to your VS2008 native dll project directory.
2. Add NativeDebug2008.dll and NativeDebugTrace.h to your native dll project.
3. Add line:
#include "NativeDebugTrace.h"
on top of your native c++ source code.
4. Use TRACE macro in your code. Syntax is usual, example:
...
int nVal = 1+1;
TRACE(L"%s = %d", L"nVal", nVal);
...
Output is showed in "normal" VS2008 Output window too, when you debug under VS2008.
If you have used another TRACE macro in your code, you can rename TRACE macro to ANY_OTHER_TRACE_NAME in NativeDebugTrace.h and call this another macro.
5. Copy all content from attachment NativeDebugTraceVS2010 directory to your VS2010 managed application or dll project directory.
6. Add both NativeDebug2010.dll and NativeDebug2008.dll to your project, set Copy if newer its option.
7. Add reference to NativeDebug2010.dll to your project.
8. Add Initialisation to your App constructor:
Code:
...
public App()
{
...
// Show graphics profiling information while debugging.
if (System.Diagnostics.Debugger.IsAttached)
{
...
NativeDebug.Init();
}
else
{
NativeDebug.RegisterOnly();
}
}
...
I am not sure why, but RegisterOnly() calling is necessary to work without debugging, your native dll will not load properly instead.
9. Add garbage release to your App closing:
Code:
...
private void Application_Closing(object sender, ClosingEventArgs e)
{
NativeDebug.Destroy();
...
}
...
10. Change your VS2010 view to Expert (Menu/Tools/Settings/Expert Settings).
11. Open your Output window on top (Menu/View/Output, click to Window Position/Float).
Now you can see all managed System.Diagnostics.Debug.WriteLine and native TRACE ouput in one Output window. Attention - option "Menu/Tools/Options/Debugging/Redirect all Output text to Immediate window" does not work for me.
You can also write output to TRACE file by standard way (see System.Diagnostics.Debug.WriteLine help).
Attention: Debug Trace Library is fully synchronised, but I did not test it to debug more then one application alternately. May be any deadlock can occure, but I beleive will not. When your managed code use another unicode string prefix then L"...", try to change calling, and write your experience here.
See example picture, follow red text:
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
Picture is from old version, included to W.I.N.C.O native library. But, yestarday I have got total hard disc crash crying::crying::crying, all my programs from long time are lost. I must programm this feature again today, I believe it is better then last weak.
Note:
Attachment is functional, but will be changed in future. Little COM mishmash and WP7 WatchDog problems occured.
Next code probably solve it, but I am not sure. Do not forget to set HKLM\Software\Microsoft\TaskHost\DehydrateOnPause to 0 first, when you want to debug application calling ShellExecuteEx() etc.
Code:
private void Application_Activated(object sender, ActivatedEventArgs e)
{
NativeDebug.Start();
}
private void Application_Deactivated(object sender, DeactivatedEventArgs e)
{
NativeDebug.Stop();
}
TRACE Output example. MFC integrated to ATL for WP7, registry export to file.
This is output from registry exporting wiht MFC using. Without tracing it woud be very difficult to tune to a flawless running:
'UI Task' (Managed): Loaded 'C:\Program Files (x86)\Microsoft.NET\SDK\CompactFramework\v2.0\WindowsCE\mscorlib.dll'
'UI Task' (Managed): Loaded 'System.Windows.RuntimeHost.dll'
'UI Task' (Managed): Loaded 'System.dll'
'UI Task' (Managed): Loaded 'System.Windows.dll'
'UI Task' (Managed): Loaded 'System.Net.dll'
'UI Task' (Managed): Loaded 'System.Core.dll'
'UI Task' (Managed): Loaded 'System.Xml.dll'
'UI Task' (Managed): Loaded '\Applications\Install\8F4EF9C1-BE29-4252-BE77-EAD8CE2E9D4E\Install\Phonmander.dll', Symbols loaded.
'UI Task' (Managed): Loaded 'Microsoft.Phone.dll'
'UI Task' (Managed): Loaded 'Microsoft.Phone.Interop.dll'
'UI Task' (Managed): Loaded '\Applications\Install\8F4EF9C1-BE29-4252-BE77-EAD8CE2E9D4E\Install\NativeDebug2010.dll', Symbols loaded.
'UI Task' (Managed): Loaded 'Microsoft.Phone.InteropServices.dll'
'UI Task' (Managed): Loaded '\Applications\Install\8F4EF9C1-BE29-4252-BE77-EAD8CE2E9D4E\Install\wxNativeCOM.dll', Symbols loaded.
'UI Task' (Managed): Loaded '\Applications\Install\8F4EF9C1-BE29-4252-BE77-EAD8CE2E9D4E\Install\wlCoreWp7.dll'
Managed ==> Native
RegGetStringSimple dwKey = 80000002, szSubKey = Pokus2012, szValueName = ValStr, lpszValue = 35EF09C
RegGetDwordSimple RegQueryValueEx returns 80070057 Parametr není správný.
RegExportKeySimple(DWORD dwKey = 80000002, LPCWSTR szSubKey = HARDWARE\DEVICEMAP, LPCWSTR szFileName = \Pokus2012.txt)
ExportRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP, CFile &out = 45FFFC48)
ExportRegKey BOM
ExportRegKey Editor Version
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP, CFile &out = 45FFFC48)
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\TOUCH, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. DriverName
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\TOUCH\BUTTONS, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. Count
RegEnumValueW returns 0 The operation completed successfully. Area
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\TOUCH\BUTTONS\3, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. VKey
RegEnumValueW returns 0 The operation completed successfully. VKeyPuvodni
RegEnumValueW returns 0 The operation completed successfully. Area
RegEnumValueW returns 0 The operation completed successfully. Name
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\TOUCH\BUTTONS\2, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. VKey
RegEnumValueW returns 0 The operation completed successfully. Name
RegEnumValueW returns 0 The operation completed successfully. Area
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\TOUCH\BUTTONS\1, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. VKey
RegEnumValueW returns 0 The operation completed successfully. Name
RegEnumValueW returns 0 The operation completed successfully. Area
RegEnumValueW returns 103 No more data is available.
DumpRegKey(HKEY hroot = 80000002, const CString &root = HKEY_LOCAL_MACHINE, const CString &key = HARDWARE\DEVICEMAP\KEYBD, CFile &out = 45FFFC48)
RegEnumValueW returns 0 The operation completed successfully. Status
RegEnumValueW returns 0 The operation completed successfully. CurLang
RegEnumValueW returns 0 The operation completed successfully. RingerState
RegEnumValueW returns 103 No more data is available.
RegExportKeySimple ExportRegKey lRes = 1)
...
Hi guys ... ,
Here PHP ..... In our daily life
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
What does php mean?
php is a self-referentially acronym for PHP: Hypertext Preprocessor. Original it supposedly meant personal home page. It is an open source, server-side, HTML embedded scripting language used to create dynamic Web pages. In an HTML document, PHP script (similar syntax to that of Perl or C ) is enclosed within special PHP tags. Because PHP is embedded within tags, the author can jump between HTML and PHP (similar to ASP and Cold Fusion) instead of having to rely on heavy amounts of code to output HTML. And, because PHP is executed on the server, the client cannot view the PHP code. PHP can perform any task that any CGI program can do, but its strength lies in its compatibility with many types of databases. Also, PHP can talk across networks using IMAP, SNMP, NNTP, POP3, or HTTP. PHP was created sometime in 1994 by Rasmus Lerdorf. During mid 1997, PHP development entered the hands of other contributors. Two of them, Zeev Suraski and Andi Gutmans, rewrote the parser from scratch to create PHP version 3 (PHP3).
In simple words >>>
PHP is a scripting language which is highly powerful open source that's widely used for web development activities to create efficient and dynamic web pages. PHP programming is specialty of Arth InfoSoft, we have developed various industry based websites like realtors, financial, engineering, social networking, hotel and hospitality, B2B, Shopping and many more.
No let's learn [ PHP Login script ] : :cyclops:
Learn to create a simple login system with php + mysql script, this tutorial is easy to follow, teach you step by step.
Overview
In this tutorial, we create 3 php files for testing our code.
1. main_login.php
2. checklogin.php
3. login_success.php
Steps
1. Create table "members" in database "test".
2. Create file main_login.php.
3. Create file checklogin.php.
4. Create file login_success.php.
5. Create file logout.php
Click to expand...
Click to collapse
STEP1: Create table "members"
For testing this code, we need to create database "test" and create table "members".
CREATE TABLE `members` (
`id` int(4) NOT NULL auto_increment,
`username` varchar(65) NOT NULL default '',
`password` varchar(65) NOT NULL default '',
PRIMARY KEY (`id`)
) TYPE=MyISAM AUTO_INCREMENT=2 ;
--
-- Dumping data for table `members`
--
INSERT INTO `members` VALUES (1, 'john', '1234');
Click to expand...
Click to collapse
STEP2: Create file main_login.php
The first file we need to create is "main_login.php" which is a login form
############### Code
<table width="300" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
<tr>
<form name="form1" method="post" action="checklogin.php">
<td>
<table width="100%" border="0" cellpadding="3" cellspacing="1" bgcolor="#FFFFFF">
<tr>
<td colspan="3"><strong>Member Login </strong></td>
</tr>
<tr>
<td width="78">Username</td>
<td width="6">:</td>
<td width="294"><input name="myusername" type="text" id="myusername"></td>
</tr>
<tr>
<td>Password</td>
<td>:</td>
<td><input name="mypassword" type="text" id="mypassword"></td>
</tr>
<tr>
<td> </td>
<td> </td>
<td><input type="submit" name="Submit" value="Login"></td>
</tr>
</table>
</td>
</form>
</tr>
</table>
Click to expand...
Click to collapse
STEP3: Create file checklogin.php
We have a login form in step 2, when a user submit their username and password, PHP code in checklogin.php will check that this user exist in our database or not.
If user has the right username and password, then the code will register username and password in the session and redirect to "login_success.php". If username or password is wrong the system will show "Wrong Username or Password".
############### Code
<?php
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// username and password sent from form
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
?>
Click to expand...
Click to collapse
STEP4: Create file login_success.php
User can't view this page if the session is not registered.
############### Code
// Check if session is not registered, redirect back to main page.
// Put this code in first line of web page.
<?php
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.php");
}
?>
<html>
<body>
Login Successful
</body>
</html>
Click to expand...
Click to collapse
STEP5: Create file Logout.php
If you want to logout, create this file. The code in this file will destroy the
// Put this code in first line of web page.
<?php
session_start();
session_destroy();
?>
Click to expand...
Click to collapse
For PHP5 User - checklogin.php
############### Code
<?php
ob_start();
$host="localhost"; // Host name
$username=""; // Mysql username
$password=""; // Mysql password
$db_name="test"; // Database name
$tbl_name="members"; // Table name
// Connect to server and select databse.
mysql_connect("$host", "$username", "$password")or die("cannot connect");
mysql_select_db("$db_name")or die("cannot select DB");
// Define $myusername and $mypassword
$myusername=$_POST['myusername'];
$mypassword=$_POST['mypassword'];
// To protect MySQL injection (more detail about MySQL injection)
$myusername = stripslashes($myusername);
$mypassword = stripslashes($mypassword);
$myusername = mysql_real_escape_string($myusername);
$mypassword = mysql_real_escape_string($mypassword);
$sql="SELECT * FROM $tbl_name WHERE username='$myusername' and password='$mypassword'";
$result=mysql_query($sql);
// Mysql_num_row is counting table row
$count=mysql_num_rows($result);
// If result matched $myusername and $mypassword, table row must be 1 row
if($count==1){
// Register $myusername, $mypassword and redirect to file "login_success.php"
session_register("myusername");
session_register("mypassword");
header("location:login_success.php");
}
else {
echo "Wrong Username or Password";
}
ob_end_flush();
?>
Click to expand...
Click to collapse
Encrypting Password - Make your Login More Secure :
Click to expand...
Click to collapse
This is the most secure form of viewing email address < or > logging in to some website .... :cyclops: >>>>>> :fingers-crossed:
SO ... This is what i kept my name >>>> Be secure
Hit thanks button >>> If i helped you in someway :highfive:
Good tuto.
I just have one question : Why not use PDO ? Since the goal is security, won't it be more efficient ?
near the end it mentions encrypting the password but doesn't say how you are doing it.
(guessing its javascript - maybe using a library to do AES encryption or possibly just sending a hash of the password instead?)
.
maybe the encryption stuff was truncated by a length limit on posts?