typedef QMap<int, QStringList> TableAi;
TableAi Box_att;
Box_att.clear();
................................................
/* incomming form value nam */
QString nametree
="zce";
/* must become alphabet 979 */
TableAi::Iterator it;
for ( it = Box_att.begin(); it != Box_att.end(); ++it ) {
if (nametree > letter) { /* compare alphabet position */
return nummer;
}
}
/*
original from php
$fp = fopen ("ahvkeys.csv","r");
while ($data0 = fgetcsv ($fp, 1000, ",")) {
if(strcmp ($data0[0], $name)>0) break;
$data1=$data0;
}
$first3letternummer=$data1[1];
*/
typedef QMap<int, QStringList> TableAi;
TableAi Box_att;
Box_att.clear();
................................................
Box_att.insert(875,QStringList() << "x" << "975");
Box_att.insert(876,QStringList() << "z" << "976");
Box_att.insert(877,QStringList() << "zam" << "977");
Box_att.insert(878,QStringList() << "zau" << "978");
Box_att.insert(879,QStringList() << "zb" << "979");
Box_att.insert(880,QStringList() << "ze" << "980");
Box_att.insert(881,QStringList() << "zeh" << "981");
Box_att.insert(882,QStringList() << "zei" << "982");
Box_att.insert(883,QStringList() << "zem" << "983");
Box_att.insert(884,QStringList() << "zf" << "984");
Box_att.insert(885,QStringList() << "zi" << "985");
Box_att.insert(886,QStringList() << "zim" << "986");
Box_att.insert(887,QStringList() << "zin" << "987");
Box_att.insert(888,QStringList() << "zk" << "988");
Box_att.insert(889,QStringList() << "zo" << "989");
Box_att.insert(890,QStringList() << "zu" << "990");
Box_att.insert(891,QStringList() << "zuc" << "991");
Box_att.insert(892,QStringList() << "zul" << "992");
Box_att.insert(893,QStringList() << "zum" << "993");
Box_att.insert(894,QStringList() << "zun" << "994");
Box_att.insert(895,QStringList() << "zur" << "995");
Box_att.insert(896,QStringList() << "zus" << "996");
Box_att.insert(897,QStringList() << "zw" << "997");
Box_att.insert(898,QStringList() << "zwe" << "998");
Box_att.insert(899,QStringList() << "zy" << "999");
/* incomming form value nam */
QString firsttree="000";
QString nametree="zce"; /* must become alphabet 979 */
TableAi::Iterator it;
for ( it = Box_att.begin(); it != Box_att.end(); ++it ) {
QStringList itemsetter = it.value();
QString letter = QString(itemsetter.at(0));
QString nummer = QString(itemsetter.at(1));
if (nametree > letter) { /* compare alphabet position */
return nummer;
}
}
/*
original from php
$fp = fopen ("ahvkeys.csv","r");
while ($data0 = fgetcsv ($fp, 1000, ",")) {
if(strcmp ($data0[0], $name)>0) break;
$data1=$data0;
}
$first3letternummer=$data1[1];
*/
To copy to clipboard, switch view to plain text mode
Bookmarks