CString newsInServer = GetGlobal("nIncomingServer"); CString newsOutServer = GetGlobal("nOutgoingServer");
CString newsServer = GetGlobal("nServer");
void CreateNewsMenu(void){	CString root   = GetGlobal("Root");	CString config = GetGlobal("CustomizationList");	CString NewsPath = root + "\\Configs\\" + config + "\\Temp\\";//NewsPath=CCKTool\Configs\configname\Temp	_mkdir (NewsPath);	CString newsDomainName = GetGlobal("nDomainName");	CString newsPrettyName = GetGlobal("nPrettyName");	CString newsLongName = GetGlobal("nLongName");	CString newsInServer = GetGlobal("nIncomingServer");	CString newsOutServer = GetGlobal("nOutgoingServer");	CString newsPortNumber = GetGlobal("nPortNumber");	// newsaccount.rdf file is created only if values are entered for all the fields in the CCK News UI			if (!( (newsDomainName.IsEmpty()) || (newsPrettyName.IsEmpty()) || (newsLongName.IsEmpty()) || (newsInServer.IsEmpty()) || (newsOutServer.IsEmpty()) || (newsPortNumber.IsEmpty()) ))	{		CString NewsFile = NewsPath +"newsaccount.rdf";		ofstream News(NewsFile);		char *shortname;		char tempdomain[25];		strcpy(tempdomain,newsDomainName);		shortname = strtok(tempdomain,".");		if (!News) 		{			cout << "The file cannot be opened \n";		}		else		{			News <<"<\?xml version=\"1.0\"\?>\n";			News <<"<RDF:RDF\n";			News <<" xmlns:NC=\"http://home.netscape.com/NC-rdf#\"\n";			News <<" xmlns:RDF=\"http://www.w3.org/1999/02/22-rdf-syntax-ns#\">\n\n";			News <<"<RDF:Description about=\"NC:ispinfo\">\n";			News <<" <NC:providers>\n";			News <<"  <NC:nsIMsgAccount about=\"domain:" << newsDomainName << "\">\n\n";			News <<"   <!-- server info -->\n";			News <<"   <NC:incomingServer>\n";			News <<"    <NC:nsIMsgIncomingServer>\n";			News <<"     <NC:prettyName>" << newsPrettyName << "</NC:prettyName>\n";			News <<"     <NC:hostName>" << newsInServer << "</NC:hostName>\n";			News <<"     <NC:type>nntp</NC:type>\n";			News <<"     <NC:port>" << newsPortNumber << "</NC:port>\n";			News <<"     <NC:rememberPassword>false</NC:rememberPassword>\n";			News <<"    </NC:nsIMsgIncomingServer>\n";			News <<"   </NC:incomingServer>\n\n";			News <<"   <!-- identity defaults -->\n";			News <<"   <NC:identity>\n";			News <<"    <NC:nsIMsgIdentity>\n";			News <<"     <NC:composeHtml>false</NC:composeHtml>\n";			News <<"     <NC:bccSelf>false</NC:bccSelf>\n";			News <<"    </NC:nsIMsgIdentity>\n";			News <<"   </NC:identity>\n\n";			News <<"   <NC:smtp>\n";			News <<"    <NC:nsISmtpServer>\n";			News <<"     <NC:hostname>" << newsOutServer << "</NC:hostname>\n";			News <<"    </NC:nsISmtpServer>\n";			News <<"   </NC:smtp>\n\n";			News <<"   <NC:smtpRequiresUsername>true</NC:smtpRequiresUsername>\n";			News <<"   <NC:smtpCreateNewServer>ture</NC:smtpCreateNewServer>\n";			News <<"   <NC:smtpUsePreferredServer>true</NC:smtpUsePreferredServer>\n\n";			News <<"   <NC:wizardSkipPanels>true</NC:wizardSkipPanels>\n";			News <<"   <NC:wizardShortName>" << shortname << "</NC:wizardShortName>\n";			News <<"   <NC:wizardLongName>" << newsLongName << "</NC:wizardLongName>\n";			News <<"   <NC:wizardShow>true</NC:wizardShow>\n";			News <<"   <NC:wizardPromote>true</NC:wizardPromote>\n";			News <<"   <NC:emailProviderName>" << newsDomainName << "</NC:emailProviderName>\n";			News <<"   <NC:sampleEmail>username@" << newsDomainName << "</NC:sampleEmail>\n";			News <<"   <NC:sampleUserName>username</NC:sampleUserName>\n";			News <<"   <NC:emailIDDescription>user name</NC:emailIDDescription>\n";			News <<"   <NC:emailIDFieldTitle>User name:</NC:emailIDFieldTitle>\n";			News <<"   <NC:showServerDetailsOnWizardSummary>false</NC:showServerDetailsOnWizardSummary>\n";			News <<"  </NC:nsIMsgAccount>\n";			News <<" </NC:providers>\n";			News <<"</RDF:Description>\n\n";			News <<"</RDF:RDF>\n";		}	News.close();	}}